Last active
May 30, 2019 07:35
-
-
Save fahadsiddiqui/66d325c689b4b88abaab238922eacb4d to your computer and use it in GitHub Desktop.
Important 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
# cache password rather retyping if not using SSH key | |
git config --global credential.helper cache | |
# local revert head upto x (number of last commit) | |
git reset --hard HEAD~x | |
# take remote head to x (commit hash) and remove commits after x (commit hash) | |
git push origin +x:IM-213 | |
# clear contents of stash stack (https://git-scm.com/docs/git-stash) | |
git stash clear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment