git status

本页内容
上一节: Git_add 下一节: Git_diff

git status 命令

Git 基本操作

git status 命令用于查看在你上次提交之后是否有对文件进行再次修改。


示例

$ git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

    new file:   README
    new file:   hello.php

通常我们使用 -s 参数来获得简短的输出结果:


示例

$ git status -s
AM README
A  hello.php

AM 状态的意思是这个文件在我们将它添加到缓存之后又有改动。

Git 基本操作

上一节: Git_add 下一节: Git_diff
此页面最后编辑于2022年8月17日 (星期三) 22:37。