retrieve git stash 1

retrieve git stash

git stash save "optional message for yourself"
git stash list
git stash show -p stash@{0}
git stash apply stash@{0}
git stash drop STASH-NAME
git stash clear

Here is what the above code is Doing:
1. git stash save “optional message for yourself”
– This saves your current changes to a stash.
2. git stash list
– This lists all of your stashes.
3. git stash show -p stash@{0}
– This shows the changes you made in the stash.
4. git stash apply stash@{0}
– This applies the changes you made in the stash.
5. git stash drop STASH-NAME
– This drops the stash.
6. git stash clear
– This clears all of your stashes.

Similar Posts