Last active
August 29, 2015 14:23
-
-
Save catm705/643a4a099e3aa75dc27d to your computer and use it in GitHub Desktop.
Collapsing git commits & Stashing
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
___ COLLAPSING COMMITS ___ | |
1. git reset HEAD~ or git reset hEAD@{3} | |
2. git push -f origin feature/url-ingestion | |
** Don't do this often and only with permission - it rewrites github's history. | |
___ STASHING ___ | |
git stash show -p stash@{0} --> This one will show you the differences in code from one stash to the other. The # indicates which. | |
git stash apply stash@{0} --> This is bring back the stash you choose according to the number you put in the curly braces. | |
git reset HEAD~ --> This will undo your last commit (only do this if you haven't git pushed it yet) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment