如何显示已上演的更改? - How do I show the changes which have been staged?

08/03 19:56
阅读数 40

问题:

I staged a few changes to be committed; 我上演了一些改变来承诺; how can I see the diff of all files which are staged for the next commit? 如何查看为下一次提交而暂存的所有文件的差异? I'm aware of git status , but I'd like to see the actual diffs - not just the names of files which are staged. 我知道git状态 ,但我想看到实际的差异 - 而不仅仅是分阶段文件的名称。

I saw that the git-diff(1) man page says 我看到git-diff(1)手册页说

git diff [--options] [--] […] git diff [--options] [ - ] [...]

This form is to view the changes you made relative to the index (staging area for the next commit). 此表单用于查看您对索引所做的更改(下一次提交的暂存区域)。 In other words, the differences are what you could tell git to further add to the index but you still haven't. 换句话说,差异是你可以告诉git进一步添加到索引但你还没有。 You can stage these changes by using git-add(1). 您可以使用git-add(1)暂存这些更改。

Unfortunately, I can't quite make sense of this. 不幸的是,我无法理解这一点。 There must be some handy one-liner which I could create an alias for, right? 必须有一些方便的单行,我可以创建一个别名,对吗?


解决方案:

参考一: https://stackoom.com/question/6f4Q/如何显示已上演的更改
参考二: https://oldbug.net/q/6f4Q/How-do-I-show-the-changes-which-have-been-staged
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
在线直播报名
返回顶部
顶部