Skip to content

Commit 78dc6a4

Browse files
committed
squash fix for multiline commit msgs
1 parent cfa001b commit 78dc6a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.gitconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# ^^ also, 2 vs 3 dots: so important. https://stackoverflow.com/a/48681527
3131

3232
# squash unique commits from branch into one commit that keeps commit msgs.
33-
squash = !"commit_body=$(git log --graph --pretty=format:'%h (%>(16)%ad %an) %s' --abbrev-commit --date=human --no-color $(git diffbase)..HEAD) && author_date=$(git log -1 --pretty=%aI HEAD) && git reset --soft $(git diffbase) && GIT_AUTHOR_DATE=\"$author_date\" git commit -m \"$commit_body\""
33+
squash = !"commit_body=$(git log --graph --pretty=format:'%h (%>(16)%ad %an) %s%+b' --abbrev-commit --date=human --no-color $(git diffbase)..HEAD) && author_date=$(git log -1 --pretty=%aI HEAD) && git reset --soft $(git diffbase) && GIT_AUTHOR_DATE=\"$author_date\" git commit -m \"$commit_body\""
3434

3535
# I prefer these from my fish abbv's, but for bash we'll keep this as a fallback.
3636
db = diffbranch

0 commit comments

Comments
 (0)