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

来源:互联网 发布:累计参与人数js效果 编辑:程序博客网 时间:2024/04/28 20:35

执行git status 命令

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


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


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


        modified:   test8.txt


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


        dddd.txt


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

Changes to be committed:      Index   暂存区,

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

Untracked files:  





原创粉丝点击