How to make Git automatically retain committer date for `git commit --amend`?

48 Views Asked by At

I am aware of Git picking up the GIT_COMMITTER_DATE environment variable, but for every amending commit, I have to manually prepend GIT_COMMITTER_DATE="$(git log -1 --pretty=tformat:%cD HEAD)" to the command line. Is there a config option to make this behavior the default? Or can a wrapper script modify the behavior for git-commit? (I am not interested in creating a custom subcommand for Git, like git amend.)

0

There are 0 best solutions below