在暂存区域中显示文件中的git diff [复制]

孤街浪徒 提交于 2020-07-27 03:09:33

问题:

Possible Duplicate: 可能重复:
How do I show the changes which have been staged? 如何显示已上演的更改?

Is there a way I can see the changes that were made to a file after I have done git add file ? 有没有办法可以看到我完成git add file后对file所做的更改?

That is, when I do: 也就是说,当我这样做时:

git add file
git diff file

no diff is shown. 没有显示差异。 I guess there's a way to see the differences since the last commit but I don't know what that is. 我想有一种方法可以看到自上次提交以来的差异,但我不知道那是什么。


解决方案:

参考一: https://stackoom.com/question/Enku/在暂存区域中显示文件中的git-diff-复制
参考二: https://oldbug.net/q/Enku/Show-git-diff-on-file-in-staging-area-duplicate
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!