Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚以交互方式暂存了文件的几块,someFile.txt. 因此,当我查看当前状态时,我会在暂存区和未暂存区看到文件。
someFile.txt
如何查看当前正在进行哪些更改?
您可以使用 . 查看当前正在上演的更改git diff --cached。
git diff --cached
不带参数,git diff将显示工作目录中未暂存的更改;使用git diff --cached它只会显示已暂存但尚未提交的更改。
git diff