正在中止`git stash apply` [英] Aborting `git stash apply`

查看:122
本文介绍了正在中止`git stash apply`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:

如何反向申请藏匿?


我后悔已经申请了一个藏匿处(错误的分支)。我怎样才能撤销这个,并将我的存储回我的存储列表中,以便稍后将其应用于右分支?

如果你还没有提交,你应该可以再次 git stash ,可能有一个 git reset HEAD first 。



另外, git stash apply 不会像那样删除存储空间,git stash pop 的确如此。所以如果你已经提交了,你可以 git reset --hard [last_good_commit] (如果你还没有推过)或者 git revert [last_good_commit] (如果你已经推送过了),只要你在右边的分支上就再次应用这个存储。


Possible Duplicate:
How to reverse apply a stash?

I regret having applied a stash (wrong branch). How can I undo this and have my stash back to my stash list in order to apply it later on the right branch?

解决方案

If you haven't committed, you should just be able to git stash again, possibly with a git reset HEAD first.

Also, git stash apply doesn't delete the stash like git stash pop does. So if you have committed, you could git reset --hard [last_good_commit] (if you haven't pushed) or git revert [last_good_commit] (if you have pushed) and just apply the stash again once you're on the right branch.

这篇关于正在中止`git stash apply`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆