10

Running into an issue that I've never seen while rebasing.

I have a master branch that has had some bugfixes.

I have a dev branch that forked off of master sometime in the past, before bugfixes.

I change to the dev branch, then run:

git rebase master

It rewinds and tries to replay the dev changes.

The rebase stops, I get a conflict that I have to resolve.

I resolved a normal conflict, added the resolved file, then run:

git rebase --continue

There is another conflict, and I run:

git status

..to see the state of things. I see some normal changes, some unmerged paths, but then also some Untracked files that I've never seen before:

path/to/something/existingFileName.ext~HEAD

I can look back and see that these files did not exist in either branch at the time of the commit that we reverted to. I'm curious about why they were created by the rebase process, and what, if anything I should do with them?

2
  • Did you use any particular merge tool to resolve the conflict? kdiff3? meld? Beyond Compare?
    – VonC
    Aug 19, 2014 at 6:36
  • It was a command line rebase, I resolved the conflicts by editting in vi. Aug 19, 2014 at 15:12

1 Answer 1

1

These are the files it uses to reconcile the merge: yours, theirs, and the thing we both started with. After you resolve the conflict, and run git rebase --continue and get done, are they still there?

3
  • I completed the rebase, but they are still there, showing as untracked files. Very odd. Aug 19, 2014 at 1:52
  • I was able to clean them up post-rebase, and it seems to have caused no problem. Still wondering how they were created though. Aug 19, 2014 at 2:24
  • 1
    I just experienced the same thing after an interactive rebase that required multiple manual conflict resolutions and involved moving / renaming files. A foo~HEAD file remained after git rebase --continue and after the rebase completed; I rmed it and had no issues from there.
    – ericsoco
    Dec 5, 2018 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.