diff --git a/oneliners/git-reauthor-branch b/oneliners/git-reauthor-branch new file mode 100644 index 0000000..08f9c73 --- /dev/null +++ b/oneliners/git-reauthor-branch @@ -0,0 +1,4 @@ +# Change the author and committer of every commit on a branch. +# Any mismatching committer dates will be adjusted to match the +# commit's author date. +EDITOR=true git rebase --committer-date-is-author-date -i --root "$(git rev-parse --abbrev-ref HEAD)" -x 'GIT_COMMITTER_DATE="$(git show -s --format=%ci)" git commit --amend --author "John Doe " -CHEAD'