English 中文(简体)
合并后取消 git 合并。 renameLimit 警告加冲突
原标题:undoing git merge after merge.renameLimit warning plus conflicts

我正试图从一个小分行 做一个合并的壁球 进入主人。

stefanos-imac:trunk borini$ git merge --squash devel
CONFLICT (content): Merge conflict in test1
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 2224 and retry the command.
Squash commit -- not updating HEAD
Automatic merge failed; fix conflicts and then commit the result.

足够公平了

stefanos-imac:trunk borini$ git config merge.renameLimit 999999

然后,我试着去掉合并,再用更高的限制重做它

stefanos-imac:trunk borini$ git merge --abort
fatal: There is no merge to abort (MERGE_HEAD missing).

好吧,所以也许我必须照上面说的做 重新调用合并司令部

stefanos-imac:trunk borini$ git merge --squash devel
fatal:  merge  is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use  git add/rm <file>  as
appropriate to mark resolution and make a commit, or use  git commit -a .

呵呵git,为什么你这样一个git?

更重要的是,有人知道如何摆脱这种情况吗?

最佳回答

Em, git reset -- hard来源/master ?

问题回答

解除合并的现代方式是 (但只有在MERCE_HEAD存在时才有效) :

git merge --abort

以及稍稍老一点的处理方式(MERGE_HEAD失踪),

git reset --merge

接受的回答(警告: 将丢弃所有本地更改)中描述的旧式方式:

git reset --hard

请注意, git 合并 -- abort 仅等同于 git 重设 -- merge ,因为存在 MERCE_HEAD 。可以在 Git 帮助中读到合并命令 。

git merge --abort is equivalent to git reset --merge when MERGE_HEAD is present.

合并失败后,当不存在 meorge_HEAD 时, 失败的合并可以用 git reseet -- merge 来撤销, 但不一定用 git 合并 -- abort 来撤销 。

git 合并 -- abort 也会做这个把戏。略快于输入整个 git 重置命令 。

中止还使用 rebase cherry-pick





相关问题
Tracking Versions, Builds, Revisions, with TortiseSVN

I am the sole developer on a project and have been using tortoiseSVN for quite a while. Now Id like to start getting version information working correctly in the project I.E. show Major Version, Minor ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

How to handle different csproj [closed]

I am working in a team of five. We are working on a C# application with five csprojects. The problem is that for each csproject, each of my colleagues has their own ideas on how to reference a DLL; ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签