-
-
Save vikas95prasad/b03df74b56eb74ba0b566fa257493618 to your computer and use it in GitHub Desktop.
Squash commits keeping commit messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git reset --soft HEAD~n && git commit --edit -m"$(git log --format=%B --reverse HEAD..HEAD@{1})" | |
* n is the number of commits you want to squash from HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment