3 ms·
You probably don't want to reset committer date like that. It tracks repo information, not file information, and is generally not visible in things like log an
by Izkata 2y ago
You probably don't want to reset committer date like that. It tracks repo information, not file information, and is generally not visible in things like log and blame.
- simonw 2y agoI first tried just using author date but that didn’t display correctly in GitHub, and the whole point of this exercise was to get the GitHub web UI to show “33 years ago”.
- Izkata 2y agoWeird. Wonder why they did that. This is what it looks like using git directly: $ git init foobar Initialized empty Git repository in /tmp/foobar/.git/ $ cd foobar/ $ vim Bar $ git add Bar $ git commit --date '2021-01-01 01:01:01' -m'Bar' [master (root-commit) fd1d31c] Bar Date: Fri Jan 1 01:01:01 2021 -0600 1 file changed, 1 insertion(+) create mode 100644 Bar $ git blame Bar ^fd1d31c (Izkata 2021-01-01 01:01:01 -0600 1) Bar $ git log commit fd1d31c2d29e3e8f6325d9abca883ce7e00d48e3 (HEAD -> master) Author: Izkata <***> Date: Fri Jan 1 01:01:01 2021 -0600 Bar $ git log --pretty=fuller commit fd1d31c2d29e3e8f6325d9abca883ce7e00d48e3 (HEAD -> master) Author: Izkata <***> AuthorDate: Fri Jan 1 01:01:01 2021 -0600 Commit: Izkata <***> CommitDate: Sat Aug 3 12:50:45 2024 -0500 Bar