theirs
옵션을 사용하여 recursive
전략을 찾고 있습니다. 망할 놈의 풀 사람이 페이지에서
git pull -s recursive -X theirs
:
recursive
This can only resolve two heads using a 3-way merge algorithm. When
there is more than one common ancestor that can be used for 3-way
merge, it creates a merged tree of the common ancestors and uses that
as the reference tree for the 3-way merge. This has been reported to
result in fewer merge conflicts without causing mis-merges by tests
done on actual merge commits taken from Linux 2.6 kernel development
history. Additionally this can detect and handle merges involving
renames. This is the default merge strategy when pulling or merging
one branch.
The recursive strategy can take the following options:
ours
This option forces conflicting hunks to be auto-resolved cleanly by
favoring our version. Changes from the other tree that do not
conflict with our side are reflected to the merge result. For a
binary file, the entire contents are taken from our side.
This should not be confused with the ours merge strategy, which does
not even look at what the other tree contains at all. It discards
everything the other tree did, declaring our history contains all
that happened in it.
theirs
This is the opposite of ours.
그러나, 이것은 정말 좋은 생각이 아니다. 업스트림의 변경 사항이 정확하다고 믿더라도 충돌을 일으키지 않는 변경 사항을 어떻게 처리하는지 알 수 있습니까?
저는 직접 git pull
이상의 개인적으로 git pull --rebase
을 선호하며 각 충돌하는 커밋을 하나씩 검사합니다.
출처
2014-01-24 00:25:36
pmr
주의 해 주셔서 감사합니다. 일반적으로 동의 하겠지만이 특별한 시나리오에서는 자동화 도구로 인해 많은 분쟁이 발생할 것입니다. –
@TrevorHickey 의미가 있습니다. 방금 누군가에게 그가 무엇을하고 있는지 모르는 사람이이 문제를 해결하기 위해 추가했습니다. – pmr