首页 > 解决方案 > 什么是针对特定提交对单个未提交文件进行 git diff 的可靠方法?

问题描述

>git diff a23a948 predictor/utils.py

即使我确定存在差异,这也不会显示任何差异。

>git diff a23a948:predictor/constants.py predictor/constants.py
fatal: Path 'predictor/constants.py' exists on disk, but not in 'a23a948'.

此错误消息令人困惑,因为该文件在该提交之前很久就已存在于存储库中。虽然后来不小心被删了。

标签: git

解决方案


推荐阅读