From 3cf35ad1d0f45c4dffa357e7b3b02383cd089bd4 Mon Sep 17 00:00:00 2001 From: Jeremy Baxter Date: Tue, 28 May 2024 12:06:47 +1200 Subject: [PATCH] git-reauthor-branch: init oneliner --- oneliners/git-reauthor-branch | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 oneliners/git-reauthor-branch 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'