Cursos /
GitHub Fundamentals
Commands Cheatsheet
Command | Description |
---|---|
git clone <url> |
Copy an entire remote repository to your local machine, including all files and history. |
git remote -v |
Display the URLs of remote repositories linked to your local repository, allowing you to verify connections. |
git remote show origin |
Show detailed information about the origin remote, including tracked branches and their status. |
git fetch |
Download commits, files, and refs from a remote repository into your local repo, updating your tracking branches. |
git pull |
Fetch from a remote repo and integrate the changes to your current branch, a combination of git fetch followed by git merge . |
git branch -r |
List all remote branches. This helps you to see the branches available on the remote repository. |
git branch -a |
List all local and remote branches. This command gives a comprehensive view of all branches available to you. |
git branch -d <branch_name> |
Delete a local branch, ensuring that you do not lose work by preventing deletion of branches with unmerged changes. |
git push -u origin <branch_name> |
Push your branch to the remote repository and set the upstream reference, linking your local branch to a remote branch. |
git rebase <branch_name> |
Apply changes from one branch onto another, typically used to maintain a linear project history by moving a feature branch to the tip of the main branch. |
git push |
Upload local repository content to a remote repository, syncing your changes. |
git push --delete origin <branch_name> |
Delete a remote branch, useful for housekeeping after merging a feature branch. |
Tudo estava claro?
Seção 3. Capítulo 6
Conteúdo do Curso
GitHub Fundamentals
GitHub Fundamentals
Commands Cheatsheet
Command | Description |
---|---|
git clone <url> |
Copy an entire remote repository to your local machine, including all files and history. |
git remote -v |
Display the URLs of remote repositories linked to your local repository, allowing you to verify connections. |
git remote show origin |
Show detailed information about the origin remote, including tracked branches and their status. |
git fetch |
Download commits, files, and refs from a remote repository into your local repo, updating your tracking branches. |
git pull |
Fetch from a remote repo and integrate the changes to your current branch, a combination of git fetch followed by git merge . |
git branch -r |
List all remote branches. This helps you to see the branches available on the remote repository. |
git branch -a |
List all local and remote branches. This command gives a comprehensive view of all branches available to you. |
git branch -d <branch_name> |
Delete a local branch, ensuring that you do not lose work by preventing deletion of branches with unmerged changes. |
git push -u origin <branch_name> |
Push your branch to the remote repository and set the upstream reference, linking your local branch to a remote branch. |
git rebase <branch_name> |
Apply changes from one branch onto another, typically used to maintain a linear project history by moving a feature branch to the tip of the main branch. |
git push |
Upload local repository content to a remote repository, syncing your changes. |
git push --delete origin <branch_name> |
Delete a remote branch, useful for housekeeping after merging a feature branch. |
Tudo estava claro?
Seção 3. Capítulo 6