4.git status
查看状态 git status
仓库初始化完成以后,我们需要查看仓库的状态,此时使用git status命令即可查看仓库中的文件状态。

git status
在状态报告中可以看到新建的liense.txt,readme.txt文件出现在Untracked files(未跟踪的文件)下面。
未跟踪的文件意味着Git在之前的快照(备份提交)中没有这些文件;Git 不会自动将之纳入跟踪范围,除非明确地告诉它“我需要使用Git跟踪管理该文件”。
使用git status输出的状态报告很详细,但有些繁琐,所以可以以精简的方式显示文件状态。

git status -s
此时 未跟踪文件前面有红色的??标记