I just did a git pull --rebase origin master and there was a conflict.
Firstly, this conflict was in a file that I hadnt touched, and was about 10 commits back. Why does this happen?
I then accidently typed git rebase --skip, and it ‘skipped that patch’.
Worried that I had skipped a commit, I checked out a new version of the master branch and did a diff between the branch that I did the rebase on, and the new master branch. The only changes that show up in the diff are the latest commit, and looking at the log, the patch that was ‘skipped’, shows up in the commit history.
Can anyone explain what is going on here?
It does what it says, it skips a commit. If you run
rebase --abortat a later conflict during the same rebase, the skipped commit will be reverted too of course.If your change already existed upstream, Git will not be able to apply your commit (but usually should skip it automatically, if the patch is exactly the same). Your own commit will be skipped, but the change will still exist in current HEAD, because it was already applied upstream.
You should really make sure you did not remove an important change of yours 😉 (use the reflog to go back to the state before the rebase)