Pregunta

I tried to do a rebase on code that I had committed but not pushed, because I had heard that there were some changes in the origin that might affect what I was working on. Here's what I get:

$ git rebase origin/thor-develop
First, rewinding head to replay your work on top of it...
Applying: PH-2127: F193: SYO for Signed in User
Using index info to reconstruct a base tree...
M       js/angular/localization/StoreListCtrl.js
M       templates/default_site/site_embed.group/html_header.html
<stdin>:17: trailing whitespace.

<stdin>:73: trailing whitespace.

<stdin>:77: trailing whitespace.

<stdin>:78: trailing whitespace.
                            $scope.address_dropdown = addressStore.getTop($scope.my_occasion, 3);
<stdin>:79: trailing whitespace.

warning: squelched 16 whitespace errors
warning: 21 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging templates/default_site/site_embed.group/html_header.html
Auto-merging js/angular/localization/StoreListCtrl.js
CONFLICT (content): Merge conflict in js/angular/localization/StoreListCtrl.js
Failed to merge in the changes.
Patch failed at 0001 PH-2127: F193: SYO for Signed in User

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".

We use Tortoise Git as a front-end editor, so I went into the Resolve tool. It usually shows differences, which are of course OK, and conflicts, which are not. It shows me absolutely no conflicts in the file referenced (StoreListCtrl.js). There are obviously differences, but no conflicts at all. What does this mean, and how do I fix it so I can complete the rebase and eventually merge my code?

¿Fue útil?

Solución

It's possible the resolve tool fixed the conflicts for you automatically. It's happened to me (and confused me) before. In this case, you can probably go straight to git rebase --continue.

The full checklist is:

  • if git status shows any un-staged changes:
    • if those files have the chevrons <<< >>> marking conflicts:
      • fix the conflicts and save the files
    • now stage all un-staged changes with git add: this marks the conflicts as resolved
  • now any conflicts are resolved and marked: use git rebase --continue
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top