简体   繁体   English

吉特:我该如何撤消导致冲突的樱桃挑剔-不提交?

[英]Git: How do I undo a cherry-pick --no-commit that generated conflicts?

I executed a git cherry-pick XXX --no-commit. 我执行了git cherry-pick XXX --no-commit。 I believe this just updates the staging area and the working directory and does not commit anything. 我相信这只会更新登台区域和工作目录,并且不会提交任何内容。 The problem is that after executing this command I got many conflicts. 问题是执行此命令后,我遇到许多冲突。 How do I undo this? 我该如何撤消呢? I want to go back to the way it was before the command. 我想回到命令之前的样子。 I ran this on a patch branch. 我在补丁分支上运行它。 what command do I execute? 我执行什么命令?

git reset --hard HEAD will restore the state of last commit. git reset --hard HEAD将恢复上一次提交的状态。 (Then you'll be able to resume your cherry-picking process, or not, or in a different order.) (然后,您将可以继续或不继续,或者以其他顺序继续进行樱桃采摘过程。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM