sh Git Stash

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Git Stash相关的知识,希望对你有一定的参考价值。

# see http://www.gitguys.com/topics/temporarily-stashing-your-work/
# git stash will not stash (save) files in the working directory unless the 
# files are being tracked (some version of the file has been added to the index).

# store state of working directory and makes it clean
git stash

# gets backs the stash (state of working directory)
git stash pop

# to check the various stash made in different branch
git stash list       

# to select the right one
git stash apply x    

# saving your stash with a save name:
git stash save "guacamole sauce WIP"

# you can use a regular expression to address that stash:
git stash apply stash^{/guacamo}
# This will apply the youngest stash that matches the regular expression guacamo.

以上是关于sh Git Stash的主要内容,如果未能解决你的问题,请参考以下文章

sh Git Stash

sh git stash - 没有保存但未跟踪文件的本地更改

git之stash

git stash

git stash 储藏

git命令之git stash apply和 pop 的区别