dotfiles/.local/bin/scripts/git-withdate
2023-05-10 17:50:42 +02:00

4 lines
205 B
Bash
Executable file

#!/bin/sh -e
# Execute a git command (usually commit) using the AuthorDate of a given committish
date=$(git log --pretty=format:%at -1 "$1")
GIT_AUTHOR_DATE="$date" GIT_COMMITTER_DATE="$date" git "${@:2}"