dotfiles/.local/bin/git-disclaim

5 lines
353 B
Bash
Executable file

#!/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