In GIT, how will you compress last n commits into a single commit?

Tom compress last n commits a single commit, we use git rebase command. This command compresses multiple commits and creates a new commit. It overwrites the history of commits.

It should be done carefully, since it can lead to unexpected results.

Leave a Reply

Your email address will not be published. Required fields are marked *