Created
July 17, 2022 19:42
-
-
Save pyqlsa/431cb284558d2d5198f4beb2ab3a0e0e to your computer and use it in GitHub Desktop.
git squash commits on feature branch
This file contains hidden or 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
#!/usr/bin/env bash | |
git checkout yourBranch | |
git reset $(git merge-base master $(git branch --show-current)) | |
git add -A | |
git commit -m "one commit on yourBranch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment