Last active
April 13, 2018 18:04
-
-
Save nh2/66e1cd83a86da7fe43b1 to your computer and use it in GitHub Desktop.
How to sign off a whole branch in git
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
[alias] | |
# Usage: git signoff-rebase [base-commit] | |
signoff-rebase = "!EDITOR='sed -i -re s/^pick/e/' sh -c 'git rebase -i $1 && while test -f .git/rebase-merge/interactive; do git commit --amend --signoff --no-edit && git rebase --continue; done' -" | |
# Ideally we would use GIT_SEQUENCE_EDITOR in the above instead of EDITOR but that's not supported for git < 1.7.8. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment