mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-23 06:02:12 +01:00
Add git stash cheat
This commit is contained in:
parent
352a760561
commit
31e442d7f9
1 changed files with 18 additions and 0 deletions
|
@ -11,6 +11,24 @@ git config --global color.ui true
|
||||||
# To stage all changes for commit:
|
# To stage all changes for commit:
|
||||||
git add --all
|
git add --all
|
||||||
|
|
||||||
|
# To stash changes locally, this will keep the changes in a separate changelist
|
||||||
|
# called stash and the working directory is cleaned. You can apply changes
|
||||||
|
# from the stash anytime
|
||||||
|
git stash
|
||||||
|
|
||||||
|
# To stash changes with a message
|
||||||
|
git stash save "message"
|
||||||
|
|
||||||
|
# To list all the stashed changes
|
||||||
|
git stash list
|
||||||
|
|
||||||
|
# To apply the most recent change and remove the stash from the stash list
|
||||||
|
git stash pop
|
||||||
|
|
||||||
|
# To apply any stash from the list of stashes. This does not remove the stash
|
||||||
|
# from the stash list
|
||||||
|
git stash apply stash@{6}
|
||||||
|
|
||||||
# To commit staged changes
|
# To commit staged changes
|
||||||
git commit -m "Your commit message"
|
git commit -m "Your commit message"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue