Created
April 25, 2012 06:17
-
-
Save cmthakur/2487096 to your computer and use it in GitHub Desktop.
git frequently used 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
#force push | |
git push -f | |
#track current branch to the remote | |
git push -u | |
git branch --set-upstream cmt origin/story/find_connections | |
#revert to the given saw | |
git revert <saw_id> | |
#arrange/manage the bulk of 5 commits | |
git rebase -i HEAD~5 | |
#git log in oneline | |
git log --oneline | |
git log --graph | |
#to show all branch at origin | |
git remote show origin | |
#reset to the previous head | |
git reset --hard ORIG_HEAD | |
#checkout remote branch | |
git checkout -b test origin/test | |
#git config | |
git config --global user.name "Gregg Pollack" | |
$ git config --global core.editor emacs use emacs for interactive commands | |
$ git config --global merge.tool opendiff use opendiff for merging conflicts | |
$ git config --global user.email "gregg@codeschool.com" | |
#aliases | |
git config --global alias.st status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i guess it should be sha not saw..