I work on project alone. I had in git log
5 commits. I merged these commits into one
git rebase -i HEAD~5
pick xxxx commit1
squash xxxx commit2
squash xxxx commit3
squash xxxx commit4
squash xxxx commit5
Now I have one commit in git log
. Everything is nice. But I have after git status
the next message:
Your branch and 'origin/master' have diverged,
# and have 1 and 5 different commits each, respectively.
I have to do git pull
but after that I'll rewrite my git log
to 5 commits again (I think).
To cut a long story short how can I push local git commits history into origin branch and get rid of the diverged error?