Ben
Ben

Reputation: 25807

Why after git rebase should do : git add?

Why after git rebase should do : "git add changedfile"?

More explanation for my Question:

  1. add command taking file to staging not commit him

  2. What git rebase --continue doing?

Thanks

Upvotes: 2

Views: 4637

Answers (1)

user229044
user229044

Reputation: 239250

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.

Upvotes: 6

Related Questions