中止Git合并 [英] Abort a Git Merge
问题描述
我正在使用Git作为VCS的项目。我从master的主线分支得到了一个分支 xyz
。工作了一段时间后,我提交了我的代码,并拉动了分支主线。
I am working on a project using Git as the VCS. I got a branch xyz
cut from the mainline branch of master. After working for a while, I committed my code and took a pull of the branch mainline.
拉线很好。然后我将代码与主人合并。合并后,某些文件出现问题。合并后我没有提交代码。有人请指导我如何中止这种合并,并将我目前工作的分支带到我合并之前的状态?
The pull was fine. I then merged the code with master. After the merge, there were problems in certain files. I have not committed the code after merging. Can someone please guide as to how I can abort this merge and bring my branch where I am working currently to the state where it was before I merged it?
推荐答案
只要你没有提交,你可以输入
as long as you did not commit you can type
git merge --abort
就像命令行提示一样。
这篇关于中止Git合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!