git diff on date?

后端 未结 3 1573
你的背包
你的背包 2020-12-13 08:22

I\'m accustomed to running a git comparison that will allow comparison with local git revs like:

git diff HEAD HEAD~110 -- some/file/path/file.ext

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-13 08:45

    Combining Jonathan Stray's suggestion to use git-rev-list --before to find the revision at a given date and Show just the current branch in Git:

    #!/bin/sh
    if [ $# -eq 0 ] || [ "$1" = "--help" ]; then
      cat <

    Call this script with a date and optionally some file names, e.g.

    git-diff-since yesterday
    git-diff-since '4 Dec 2012' some/file/path/file.ext
    

提交回复
热议问题