Write a script for resetting commit author metadata

This commit is contained in:
Ohad Livne 2025-11-08 16:40:27 +02:00
parent 665cbeaec3
commit f303e2b05e
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D
2 changed files with 6 additions and 0 deletions

View file

@ -5,6 +5,7 @@
br = branch br = branch
ci = commit ci = commit
co = checkout co = checkout
disclaim = !git-disclaim
resign = !git-resign resign = !git-resign
sign = commit --amend --no-edit --gpg-sign sign = commit --amend --no-edit --gpg-sign
st = status st = status

5
.local/bin/git-disclaim Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
author_name="$(git show --no-patch --format='%an' HEAD)"
author_email="$(git show --no-patch --format='%ae' HEAD)"
GIT_AUTHOR_NAME="${author_name}" GIT_AUTHOR_EMAIL="${author_email}" GIT_COMMITTER_NAME="${author_name}" GIT_COMMITTER_EMAIL="${author_email}" git commit --amend --author "${author_name} <${author_email}>" --no-edit --no-verify