I want to squash commits in git after they have been pushed. So I find the question How to squash commits in git after they have been pushed?.
I do as the accepted answer said:
git rebase -i origin/master~4 master
But I forget to add the +
parameter before the master while pushing it to github. It means I use git push origin master
rather than git push origin +master
.
I want to know does it matter much and how to undo that so I can use the right command.
-------------------EDIT1----------------------------
I use emacs magit as my git client, so specificly speaking, I use magit-push-other origin master
.
Magit's log is below, the red rectangle circles two commits I want to squash. After I squash that two commits, magit informs me that there are one commit unpushed and two commits unmerged from upstream. Then I use magit-pull-from-upstream
and magit-push-other origin master
to complete those changes. Then the commit log is what the picture draws.
If git push origin master
wouldn't work at this situation, it seems it's more like a magit question.