Created
October 6, 2016 03:49
-
-
Save shabin-slr/f480817116076088ff7734429c7a7312 to your computer and use it in GitHub Desktop.
Some Git Commands
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
#Show Remote of current branch | |
#Reference : http://stackoverflow.com/questions/171550/find-out-which-remote-branch-a-local-branch-is-tracking | |
git branch -vv | |
#Create local branch from remote | |
#http://stackoverflow.com/a/1787014/3370859, | |
#eg. : "git checkout test", will create local branch test from origin/test | |
git checkout <branch name without /origin> | |
#Delete a local branch | |
http://stackoverflow.com/questions/2003505/how-to-delete-a-git-branch-both-locally-and-remotely | |
git branch -d the_local_branch | |
#Delete a remote branch | |
http://stackoverflow.com/questions/2003505/how-to-delete-a-git-branch-both-locally-and-remotely | |
git push origin --delete the_remote_branch | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment