Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 当前的阶段性更改是什么?_Git - Fatal编程技术网

Git 当前的阶段性更改是什么?

Git 当前的阶段性更改是什么?,git,Git,我刚刚以交互方式展示了一个文件的几个部分,someFile.txt。因此,当我查看当前状态时,我会在暂存和未暂存区域中看到文件 如何查看当前暂存的更改?您可以使用git diff--cached查看当前暂存的更改 如果没有参数,git diff将显示工作目录中未老化的更改;使用git diff--cached它将只显示已暂存但尚未提交的更改。这似乎是我应该在谷歌上搜索的内容,但“git what's current staged”(git what's current staged)只会显示大量

我刚刚以交互方式展示了一个文件的几个部分,
someFile.txt
。因此,当我查看当前状态时,我会在暂存和未暂存区域中看到文件


如何查看当前暂存的更改?

您可以使用
git diff--cached
查看当前暂存的更改


如果没有参数,
git diff
将显示工作目录中未老化的更改;使用
git diff--cached
它将只显示已暂存但尚未提交的更改。

这似乎是我应该在谷歌上搜索的内容,但“git what's current staged”(git what's current staged)只会显示大量结果,向我解释暂存区域,我已经知道了。很好的快速修复方法。;)谢谢仅供参考,您还可以执行
git diff HEAD
,它将显示与上一次提交相比的所有更改。从外观上看,它显示了分阶段和未分阶段的更改。