My local repo was looking like that before I had to pull:
[my commit 3] <- to be pushed
[my commit 2] <- already pushed
[my commit 1]
So I pulled and had to do a merge because there were conflicts, which I commited locally:
[merge commit] <- created that by resolving conflicts
[new commit from coworker] <- pulled that
[my commit 3]
[my commit 2]
[my commit 1]
Now my questions is how I can get rid of the merge commit at the top. I think it should look like that:
[my commit 3]
[new commit from coworker]
[my commit 2]
[my commit 1]
How can I rebase like that?
Instead of
git pull, dogit pull --rebase.(You can
git reset --hard [my commit 3]to get back to where you were before the pull, then dogit pull --rebase.)