最佳答案
我正在git pull --rebase
之后的重基过程中。我有一些文件合并冲突。我如何接受特定文件的“他们的”更改或“我的”更改?
$ git status
# Not currently on any branch.
# You are currently rebasing.
# (fix conflicts and then run "git rebase --continue")
# (use "git rebase --skip" to skip this patch)
# (use "git rebase --abort" to check out the original branch)
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: CorrectlyMergedFile
#
# Unmerged paths:
# (use "git reset HEAD <file>..." to unstage)
# (use "git add <file>..." to mark resolution)
#
# both modified: FileWhereIWantToAcceptTheirChanges
# both modified: FileWhereIWantToAcceptMyChanges
通常我只是打开文件或合并工具,手动接受所有“他们的”或“我的”更改。但是,我怀疑我错过了一个方便的git命令。
另外,请注意,只有当我看到哪些文件发生冲突或冲突可能是什么时,我才能为每个文件选择合并策略。