Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 289 Bytes

index.md

File metadata and controls

17 lines (12 loc) · 289 Bytes

git commit-is-merge

Is the commit a merge commit? If yes exit 0, else exit 1

Git alias:

commit-is-merge = !"f(){ \
    [ -n \"$(git commit-parents \"$*\" | sed '0,/^parent /d')\" ]; \
};f"

Example:

git commit-is-merge && do-something || do-something-else