1、在git add添加前,查看未提交的更改:git diff

2、使用git add . 添加文件到缓冲区(staging area)后再次查看变化:
git diff --cached //看到add之后的更改
git diff --staged //看到还是上次放到缓冲区的内容
git diff HEAD //是git diff和git diff --cached的合并。

参考:
https://blog.csdn.net/toopoo/article/details/88874027

posted on 2023-08-29 15:08  西伯尔  阅读(55)  评论(0编辑  收藏  举报