Ask HN: Is there something like “today X years ago” but for Git?

  • 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.

  • For a single file you can use `git log` to show you all patches that changed the file, going back in history forever:

      git log --follow --patch -- some/file
    
    It composes with Tomte's @{1 year ago} tip if you want to start reading at a particular point in time:

      git log --follow --patch 'main@{1 year ago}' -- some/file
    
    ref: https://git-scm.com/docs/git-log

  • There is https://retrogit.com/ that sends you emails on what happened in repositories on this day, similar to memories.