经过一阵子我正在重新扎根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命令。
另外,请注意,当我看到哪些文件遇到冲突以及可能是什么冲突时,我将只能为每个文件选择合并策略。