git diff:--cached和--staged有什么区别 [英] git diff: what is the difference between --cached and --staged

查看:77
本文介绍了git diff:--cached和--staged有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

比较上次提交和上一次提交:

To compare the staged with the last commit:

git diff --cached
git diff --staged

两个命令都产生相同的结果,对吧?

Both commands generate the same results, right?

推荐答案

git diff的文档说"--staged是--cached的同义词",所以是.

The documentation for git diff says "--staged is a synonym of --cached", so yes.

这篇关于git diff:--cached和--staged有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆