Skip to content

Instantly share code, notes, and snippets.

@orendon
Last active August 14, 2021 17:16
Show Gist options
  • Save orendon/f4344ba172b718ecf6ebb84cff0d3d12 to your computer and use it in GitHub Desktop.
Save orendon/f4344ba172b718ecf6ebb84cff0d3d12 to your computer and use it in GitHub Desktop.
git edit last commit date
# edit to current date
GIT_COMMITTER_DATE="$(date)" git commit --amend --no-edit --date "$(date)"
# edit to arbitrary date
GIT_COMMITTER_DATE="Fri Aug 13 18:00:00 2021 -0500" git commit --amend --no-edit --date "Fri Aug 13 18:00:00 2021 -0500"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment