首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Git stash应用和删除

Git stash应用和删除
EN

Stack Overflow用户
提问于 2013-02-09 01:51:21
回答 2查看 11.2K关注 0票数 45

有没有一个git命令既可以应用stash又可以删除它?

这是一个命令:

代码语言:javascript
复制
git stash apply
git stash drop
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-02-09 01:54:31

你想要git stash pop

代码语言:javascript
复制
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, i.e., do the inverse
       operation of git stash save. The working directory must match the
       index.
票数 72
EN

Stack Overflow用户

发布于 2013-02-09 01:54:21

git stash pop将获取列表(或您指定的列表)中的第一个stash,将其应用于您的HEAD,并将其从stash列表中删除。

票数 20
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14778460

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档