3 ms·
Are you looking for git checkout 'main@{1 year ago}' See also https://git-scm.com/docs/git-rev-parse https://git-scm.com/docs/git-rev-parse, that works with al
by Tomte 4y ago
Are you looking for git checkout 'main@{1 year ago}'
See also https://git-scm.com/docs/git-rev-parse 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.
- brasic 4y agoA fun thing is that the full gitrevisions syntax used by `rev-parse` is supported many places on GitHub where you would normally put an object id or ref name. For example, https://github.com/git/git/tree/master@{5.years.ago} 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)