Created
September 26, 2014 08:15
-
-
Save iamaravi/68f272436b1b49dea286 to your computer and use it in GitHub Desktop.
Common 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
#Branching | |
Create | |
git checkout -b [name_of_your_new_branch] | |
git push origin [name_of_your_new_branch] | |
Delete | |
git branch -D [name_of_your_new_branch] | |
git push origin :[name_of_your_new_branch] | |
#Tagging | |
Create | |
git tag -a v1.4 -m 'my version 1.4' | |
git push origin v1.5 | |
Drop | |
git tag -d 12345 | |
git push origin :refs/tags/12345 | |
# Commit | |
Create | |
git add <file> | |
git commit -m <custom message> | |
git push origin <branch name> | |
Delete/Undo | |
git reset --[soft|hard] HEAD~1 | |
#push | |
git push origin <branchname> | |
#pull | |
git pull origin <branchname> | |
#ignoring chmod change | |
git config core.fileMode false | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment