Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get conflicts with git rebase -p -i?

I'm using

 git rebase -p -i SHA1^

And moving a single commit backwards in time to just after SHA1. The commit consists of a WAV file, so there's no way this is breaking my code.

Seemingly unrelated files pop up in conflicts later in history. Why am I getting these conflicts during the rebase in this scenario? Isn't -p enough to keep the relationship to other parts of history intact ? There is something about rebasing I'm not catching totally here...

like image 603
krosenvold Avatar asked Dec 05 '25 14:12

krosenvold


1 Answers

A commit is never just a single file. A commit is the entire tree as of that moment. And depending on the common merge base of the commit your trying to move and the commit you're trying to move it onto, there could be quite a few changes.

like image 166
Randal Schwartz Avatar answered Dec 08 '25 05:12

Randal Schwartz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!