Skip to content

Instantly share code, notes, and snippets.

@swapnil-kotwal-sp
Created July 13, 2015 06:54
Show Gist options
  • Save swapnil-kotwal-sp/3078a96619e177e60e40 to your computer and use it in GitHub Desktop.
Save swapnil-kotwal-sp/3078a96619e177e60e40 to your computer and use it in GitHub Desktop.
git stash daily use commands
git stash (save changes temporarily to get pull/switch branch etc.)
1. git stash save "message" :- save local changes temporary
2. git stash apply :- apply stash changes without dropping it
3. git stash pop :- remove stash and apply
4. git stash drop :- remove stashed changes without applying it
5. git stash show -p stash@{0} :- see what stashed @index 0
git stash only one file
1. git add app/controllers/cart_controller.java
2. git stash --keep-index
3. git reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment