Created
May 28, 2011 09:58
-
-
Save theleoborges/996758 to your computer and use it in GitHub Desktop.
A few useful 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
#undo last commit | |
git reset HEAD^ | |
#show files in a given commit | |
git show --pretty="format:" --name-only rev_number | |
#remove untracked files and directories | |
git clean -f -d | |
#track remote branch | |
git branch --track branch_name origin/master | |
#push local branch to remote | |
git push origin branch_name | |
#delete remote branch | |
git push origin :remote_branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment