I have done something really weird. And I don't know what to do know.
I am working with Gerrit, and it just showed me that it cannot merge because of a conflict, but there were no conflicts, but instead I guess it was because of detached HEAD
And I started to do really random thing, firstly I cherry-picked
3 commits into one, and than I got the master branch again detached, that I tried to rebase, but got a merge conflict, so finally I got the following log
https://i.stack.imgur.com/6N6Tt.jpg
This is because I don't understand the difference between merge
and rebase
Could you please help me to fix the history (into one straight line) and answer the question :
What is the difference between merge
and rebase
if by default git uses fast-forward
so the result looks exactly the same as rebase does. And in my case I couldn't make the rebase because of merge conflicts. So what is the purpose of rebase
than ?