2

Because Git is distributed, and committers can commit within their own repositories, they can make a series of commits, then git squash the series of commits to make a new commit, then git push only the new commit. In this case you don't have the original commits anywhere: they are only in the committer's repository, not on GitHub and not in your clone either.

How do you "git push only the new commit" ?

0

1 Answer 1

1

It is just a normal push. I am pretty sure what they mean there: you push just the squashed commit - not the commits that existed before the squash. Lets say you made commit 1/2/3 and squashed to 4 - then you push with a normal git push - then commit 4 is pushed and exists remote (e.g. on github) and 1/2/3 only exist locally

Not the answer you're looking for? Browse other questions tagged or ask your own question.