Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设它foo.txt在索引中。
foo.txt
为什么这样做:
git reset foo.txt
返回 1:
$ echo $? 1
?
git reset foo.txtfoo.txt如果重置后没有未分级的更改,则返回零,如果有,则返回一。
这允许脚本代码确定自上次提交以来是否已修改相关文件。