为什么在 git rebase 之后应该做:“git add changedfile”?
我的问题的更多解释:
将命令文件添加到暂存而不提交他
什么 git rebase --continue 做什么?
谢谢
为什么在 git rebase 之后应该做:“git add changedfile”?
我的问题的更多解释:
将命令文件添加到暂存而不提交他
什么 git rebase --continue 做什么?
谢谢
If Git is telling you to type git rebase --continue
, it's because the rebase isn't finishing. It sounds like you're stopping mid-rebase because of one or more conflicted files.
When you are in a conflicted state, you can type git status
and look for "Unmerged paths" and files marked as "both modified":
# Unmerged paths:
# (use "git add/rm ..." as appropriate to mark resolution)
#
# both modified: README
Git is asking you to manually resolve the conflicted file, remove the change markers, and then git add <file>
to mark the conflict resolved. This moves the changes into the staging area, telling Git to include them in the rebased commit which it will generate when the rebase continues.
Once you've done this, you can continue rebasing with git rebase --continue
.