Skip to content

Instantly share code, notes, and snippets.

@dzc34
Last active September 16, 2016 23:59
Show Gist options
  • Save dzc34/fd3cc992b22e73832cb09a286d5d7a7f to your computer and use it in GitHub Desktop.
Save dzc34/fd3cc992b22e73832cb09a286d5d7a7f to your computer and use it in GitHub Desktop.
GIT - Forcer la date "Auteur" et la date "Auteur du commit"
# Forcer la date "Auteur" (date du commit initial) / GIT_AUTHOR_DATE
git commit --amend --date="2016-08-21 17:18:43 +0200"
# Forcer la date "Auteur du commit" (date du commit après éventuel rebase)
export GIT_COMMITTER_DATE="Wed Feb 16 14:00 2037 +0100"
git commit --amend
unset GIT_COMMITTER_DATE
# source
# http://stackoverflow.com/questions/454734/how-can-one-change-the-timestamp-of-an-old-commit-in-git
# http://stackoverflow.com/questions/19742345/what-is-the-format-for-date-parameter-of-git-commit
# https://alexpeattie.com/blog/working-with-dates-in-git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment