git diff: what is the difference between --cached and --staged

前端 未结 3 1105
星月不相逢
星月不相逢 2021-02-05 01:29

To compare the staged with the last commit:

git diff --cached
git diff --staged

Both commands generate the same results, right?

3条回答
提交回复
热议问题