开发者

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

开发者 https://www.devze.com 2022-12-09 14:51 出处:网络
I\'m using git rebase -p -i SHA1^ And m开发者_如何学Gooving 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.

I'm using

 git rebase -p -i SHA1^

And m开发者_如何学Gooving 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...


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消