Are you looking for git checkout 'main@{1 year ago}'
See also https://git-scm.com/docs/git-rev-parse, that works with all kinds of git subcommands.
BTW, git doesn't track every change, only when you add the change.
See also https://git-scm.com/docs/git-rev-parse, that works with all kinds of git subcommands.
BTW, git doesn't track every change, only when you add the change.
For example, https://github.com/git/git/tree/master@{5.years.ago}
Note that this uses the reflog which means that it won’t work in some situations (branch renames, entries rolled off the end of the log, etc)