Last active
June 16, 2017 06:11
-
-
Save sworup/20e2f26ed0252747ac5ceed06893f549 to your computer and use it in GitHub Desktop.
Git commands listing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout develop && git pull --rebase |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Listing out branches | |
$ git branch // List local branches | |
* master | |
$ git branch -a // List all branches | |
* master | |
origin/1-2-stable | |
origin/2-0-stable | |
origin/2-1-stable | |
origin/2-2-stable | |
origin/3-0-unstable | |
origin/HEAD | |
origin/master | |
$ git branch -r // List remote branches | |
origin/1-2-stable | |
origin/2-0-stable | |
origin/2-1-stable | |
origin/2-2-stable | |
origin/3-0-unstable | |
origin/HEAD | |
origin/master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git merge --no-commit --no-ff issue/#467 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rename your local branch. | |
// If you are on the branch you want to rename: | |
git branch -m new-name | |
// If you are on a different branch: | |
git branch -m old-name new-name | |
// Delete the old-name remote branch and push the new-name local branch. | |
git push origin :old-name new-name | |
// Reset the upstream branch for the new-name local branch. | |
// Switch to the branch and then: | |
git push origin -u new-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://multiplestates.wordpress.com/2015/02/05/rename-a-local-and-remote-branch-in-git/