Git 常用操作(七) git status 与git中文件的三个状态

执行git status 命令

$ git status
On branch test3
Changes to be committed:
  (use "git reset HEAD ..." to unstage)


        modified:   .gitignore
        new file:   test15.txt
        deleted:    test2.txt


Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)


        modified:   test8.txt


Untracked files:
  (use "git add ..." to include in what will be committed)


        dddd.txt


由上图可知,共有三种文件状态

Changes to be committed:      Index   暂存区,

Changes not staged for commit:   working directory  工作目录

Untracked files:  





你可能感兴趣的:(git)