1

See this repository, https://github.com/steeve/france.code-civil/tree/master/Livre%20III/Titre%20VII there are files of 48 years ago... How to do it?

Can I preserve old dates after commit? No conflicts in git when changing dates?

PS: the aim in this example is to simulate document time and to reproduce the sequence of changes in the real world.

Peter Krauss
  • 13,174
  • 24
  • 167
  • 304

1 Answers1

2

You can do this with the --date argument to git commit. For example:

git commit --date="Wed Feb 16 14:00 2037 +0100"

You can edit an existing date, too: use git commit --amend.

For more information, check out Working with dates in git.

Christian Ternus
  • 8,406
  • 24
  • 39