If you want see the preview of your git stash content without applying them. You can use git stash show
command to do so.
Preview the content of the most latest stash
1 | git stash show -p |
Preview specific stash content
1 | git stash show -p stash@{i} |
Only want to know names of stash files
1 | git stash show -p stash@{i} --name-only |
Stash untracked new files
By default, git stash
only stash tracked files. It will not stash new created files which are untracked.1
git stash --include-untracked
it will not stash ignored files.1
git stash --all
it will stash all files, including untracked and ignored files.
List all stashed changes
1 | git stash list |
Clear all local stashed changes
1 | git stash clear |
Delete one specific stashed change
1 | git stash drop stash@{index} |
More Information:
https://stackoverflow.com/questions/11369375/how-can-i-delete-all-of-my-git-stashes-at-once
See what’s in a stash without applying it
How do you stash an untracked file?
赏
使用支付宝打赏
使用微信打赏
若你觉得我的文章对你有帮助,欢迎点击上方按钮对我打赏
扫描二维码,分享此文章