Created
January 11, 2011 16:19
-
-
Save bkrauska/774648 to your computer and use it in GitHub Desktop.
Git Branching Cheat Sheet
This file contains 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
// list local branches | |
git branch | |
// list remote branches | |
git branch -r | |
// list all branches | |
git branch -a | |
// create new branch | |
git branch <branch-name> | |
// create new branch from another branch | |
git brach <branch-name> <existing-branch-name> | |
// pull from master | |
git pull origin master | |
// switch to branch | |
git checkout <branch-name> | |
// push to branch | |
git push origin <branch-name> | |
// delete branch | |
git branch -d <branch-name> | |
// delete remote branch | |
git push origin :<branch-name> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment