Created
November 28, 2019 01:19
-
-
Save mifas/15dc4cc9412cef36e1714a41a12d8184 to your computer and use it in GitHub Desktop.
git branch --squash with simplified commit logs
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
function git_squash_branch() { | |
b=$1 | |
git merge --squash "$b" | |
echo "" | |
echo "" | |
git log --reverse --format='%h %s ► %an <%ae>' .."$b" | |
#git commit -m "$(git log --reverse --format='%h %s ► %an <%ae>' .."$b")" | |
} | |
alias gsb="git_squash_branch" | |
# ---- usage ---- | |
# git checkout master | |
# gsb feature-branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment