如何验证来自例如现有提交的内容去年还没变? 我有10个具有相同标记的提交,其内容可能丢失或被覆盖。现在我需要将当前内容与旧提交进行匹配,以验证是否有更改。
答案 0 :(得分:1)
比较两个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