I am working on a two person team. I made some changes to a file called PostSet. I pushed those changes. My partner had also made changes to the same file, and even to the same query. He ran
git pull --rebase origin master
in order to put his changes on top of mine and keep the working history clean, as we always do. Normally we get conflicts if we edit the same line.
He was notified of a whole bunch of conflicts relating to some image files (a completely different issue). Just to explain everything, he fixed that problem by using
git rm -r path/to/image/dir
and then
git add -A
to add all of those changes to the index. After using
git rebase --continue
there were no more conflicts. We immediately noticed, however, that the relevant query was now using MY changes, not his. In fact, the entire file PostSet was on an old version after the rebase.
Shouldn't there have been some sort of conflict warning about the PostSet file? Is there something we did wrong with the rebase?
In short, we can't confidently continue development until we know changes will stop being overridden, so we're fairly frustrated.
Thanks a lot,
Paragon
Edit: We replicated our steps exactly and got the same result.
Edit: Given that nobody seems to have any clue, I will likely be reporting this as a bug in git. I'll leave it up for a while longer on the off chance that someone has a wild suggestion.
I did the same steps using git version 1.7.3.1. After the step:
git rm -r path/to/image/dir
The file PostSet is still in conflict mode, you can verify by requesting that status (here is my output):
$ git status -s
UU PostSet
D images/test.jpg
Now you still need to solve the conflict in PostSet. If you skip that and execute instead
git add -A
you get the following case where git considers it as a solved conflict while you haven't actually done that:
$ git status -s
M PostSet
D images/test.jpg
So better to solve the conflict first and use afterwards git add -A
Or I might be missing some information here?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With