educative.io

Confused about git squashing

After I squashed commits and pointed the HEAD back to my master branch and tried to push my chanes i.e. the squashed commit history, as expected I got the error saying that I have to pull from remote and then push back to be consistent., but that defeats the purpose of squashing. When I pull from remote as per the command, the full unsquashed commit history is also pulled down and I want to push out the squashed commit histort out.

Actually in the subsequent lesson I found the answer i.e. git force push and how squashing history can cause git merge pull hell.