git:避免git-notes中的合并冲突 [英] git: avoiding merge conflicts in git-notes
问题描述
是否有解决git的注释分支(git-notes)中的合并冲突的最佳方法。通常的做法是做一个
git pull --rebase origin refs / notes / commitits:refs / notes / commitits
不起作用。我试过的方法是:
pre $ git checkout refs / notes / commitits
git fetch origin refs / notes / commitits: refs / notes / origin / commitits
git merge FETCH_HEAD
git update-ref refs / notes / commitits
但它会产生合并冲突并破坏历史记录。请帮忙。
立即的帮助将不胜感激。谢谢
例如,如果文件
A
,那么文件A会被合并,但是文件B
不会被合并
如在合并冲突时合并git笔记中所述
$ b $ pre $ g $ git fetch origin refs / notes / commitits:refs / notes / origin / commitits
git notes merge -v origin / commits
如果有冲突,它现在会告诉您编辑
.git / NOTES_MERGE_WORKTREE
,然后通过git notes merge --commit
提交结果,或者用取消合并。 git notes merge --abort
。
所以 B
应该在 git notes合并--commit
之后合并。注意:Git 2.6(Q3 / Q4) 2015)将添加 git notes merge
策略。
is there a best approach for resolving merge conflicts in notes branch(git-notes) of git. The usual practice of doing a
git pull --rebase origin refs/notes/commits:refs/notes/commits
does not work. The approach which i tried was
git checkout refs/notes/commits
git fetch origin refs/notes/commits:refs/notes/origin/commits
git merge FETCH_HEAD
git update-ref refs/notes/commits
but it creates merge conflicts and disrupts the history. Please help. Immediate help would be appreciated. Thanks
For example, if there is a conflict in file
A
, then file A gets merged, but fileB
does not get merged
As mentioned in "Merging git notes when there are merge conflicts in them"
git fetch origin refs/notes/commits:refs/notes/origin/commits
git notes merge -v origin/commits
If there are conflicts, it will now tell you to edit
.git/NOTES_MERGE_WORKTREE
and then commit the result viagit notes merge --commit
, or abort the merge withgit notes merge --abort
.
So B
should get merged after the git notes merge --commit
.
Note: Git 2.6 (Q3/Q4 2015) will add git notes merge
strategies.
这篇关于git:避免git-notes中的合并冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!