So as mentioned here a git pull
is just fetching the latest and then merging them.
Isn't that the same for a git push
? ie from the remote...you fetch the local and merge it into the branch?
Or is that you're not merging anything, rather you're totally re-writing history of commits...ignoring whatever was there and just replacing commit lists with a newer one?
(I'm fully aware of when to use git push
ie I use when I'm done with a feature in my local. I push into my origin. My question is more about what happens under the hood)