Last active
October 3, 2017 01:36
-
-
Save cowlinator/c382e461db1c168d56a7af715e0b08f2 to your computer and use it in GitHub Desktop.
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
git checkout -- . DISCARD non-staged changes | |
git clean -d -f DISCARD untracked files | |
git cherry-pick --no-commit $SHA Cherry-pick to staging area | |
git revert --no-commit $SHA Revert to staging area | |
git push -f FORCE push | |
git reset --hard @{u} RESET HARD to upstream-branch | |
git branch --unset-upstream Track Remote: None (for current branch) | |
git branch --set-upstream-to=$REMOTE_BRANCH Track Remote (for current branch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment