There are two files in my Git repository: alpha and beta , with identical content.
If I delete alpha in my master branch and edit it in my properties branch, then when I merge the master into a function, I warn of a conflict. Suppose I resolve this by removing alpha .
If I then reinstall the function branch to master using git rebase master , alpha is deleted, but the changes I made for alpha in the function branches now apply to beta ! I get a conflict warning, but it is happily resolved with automatic merging without locking the lock for me.
Interestingly, if I do a git rebase -i and just accept the default, beta not editable, and I can resolve the same conflict that was resolved during the merge.
Three related questions:
- Why does Git think that the change I applied to one file should be applied to another, unless the other has been edited by some kind of commit?
- How can I avoid this situation?
- Why is the behavior different from interactive rebase even when I accept the default options?
I am running Git 1.7.9 on Cygwin on Win7. I put a transcript on pastebin showing it, starting with git init in an empty directory, if someone wants to see the details for themselves (I don't post this here because of the length).
source share