I have done something really weird. And don't know what to do know.
I am working with Gerrit, and it just showed me that it cannot merge because of conflict, but there were any conflict, but instead I guess it was because of detached
Rebase is different from merge because git uses
fast-forward only if it can. E.g.: you create a new branch from
master, you commit to your new branch, you don't commit to
master, and then you want to
merge your changes back to master: git will think this is the same as if you'd have just committed to
master anyway. And it'll think the same if you'd use
rebase in this situation.
The real fun begins when you have changes on both branches and git can't use fast-forward: then
merge will create a new commit for which the parents will be your last commits on both of your branches, and
rebase will try to move the base of your branch that you're trying to rebase to the head of your other branch.
So, to "fix" your history (into one straight line), you need to undo your merge (labeled as head) and you need to rebase your
Rebasing branch to your
git checkout Rebasing git rebase master
You'll still have conflicts, that you need to resolve and continue with
git rebase --continue
as many times as necessary.