如何验证去年现有提交的内容是否仍然保持不变?我有 10 个具有相同标签的提交,内容可能会丢失或覆盖。现在我需要将当前内容与旧提交相匹配,以验证是否有更改。
比较两个commit/branch
,看看是否有任何差异。
$ git fetch
$ git log # copy the commit hash
$ git diff HEAD..<commit> # shows what is in the commit that is not in HEAD
$ git diff <commit-1> <commit-2> # diff of two commits
$ git diff <branch-1>..<branch-2> # diff off two branches