赞
踩
1 stash是本地的,不会通过git push命令上传到git server上
2 使用git stash暂存修改时,除了用git stash直接保存外,还可以给每个stash加一个标记,
git stash save <message>
git stash --help
save [-p|--patch] [-k|--[no-]keep-index] [-u|--include-untracked] [-a|--all] [-q|--quiet] [<message>]
Save your local modifications to a new stash, and run git reset --hard to revert them. The <message> part is optional and gives the description along with the stashed state.
3 git stash pop与gite stash apply的区别
pop [--index] [-q|--quiet] [<stash>]
Remove a single stashed state from the stash list and apply it on top of the current working tree state
apply [--index] [-q|--quiet] [<stash>]
Like pop, but do not remove the state from the stash list
git stash apply可以将缓存堆栈中的stash多次应用到工作目录中,不删除stash拷贝
4 查看已有的stash
git stash list
在使用git stash apply
命令时可以通过名字指定使用哪个stash,默认使用最近的stash(即stash@{0})
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。