git查看本地仓库状态

git status 命令

  1. $ git status
  2. On branch master # 当前本地仓库是在master分支里面,git默认分支就是在master分支里面
  3. No commits yet # 当前还没提交任何东西
  4. nothing to commit (create/copy files and use "git add" to track) # 还没什么东西需要提交

我在文件库里面新添加了hello.txt之后,再使用git status 查看

  1. $ git status
  2. On branch master
  3. No commits yet
  4. Untracked files: # 未被追踪的问题
  5. (use "git add <file>..." to include in what will be committed)
  6. hello.txt
  7. nothing added to commit but untracked files present (use "git add" to track)