语法
git status
示例
首次查看本地库
本地库未添加任何文件
说明
on branch master //提示当前本地库在哪一个分支
No commits yet //当前还没提交东西(空的Git库)
nothing to commit (create/copy files and use "git add" to track) //文件目录下没有创建任何文件
做修改
在本地库创建一个文件
cat >> hello.txt //输入一些内容到hello.txt文件(若无hello.txt文件会自动创建)
注意:Ctrl + D 结束输入
再次查看
说明
Untracked files:
(use "git add <file>..." to include in what will be committed)
hello.txt未被追踪的文件
nothing added to commit but untracked files present (use "git add" to track)
需要将其添加到暂存区