Repository navigation
Git
Doug Hagan edited this page Jul 21, 2017
·
9 revisions
Download all branches and changes from the remote repository, and remove orphaned local branches.
> git fetch -p
Update the current local branch with remote changes.
> git pull
Create a new local branch.
> git checkout -b <branch_name>
Delete a local branch.
> git branch -d <branch_name>
Checkout from an existing branch.
> git checkout <branch_name>
Checkout from an existing tag.
> git checkout tags/<tag_name>
Commit local changes to a local branch.
> git commit
Enter a descriptive comment.
Upload changes on a local branch to the remote repository.
> git push origin <branch_name>
Create a marker on the current local branch.
> git tag <tag_name>
Upload markers on all local branches to the remote repository.
> git push origin --tags