git status 用于查看工作区与暂存区的已tracked及untracked的所有文件status.

以下为help结果。

git help status

NAME

git-status - Show the working tree status

DESCRIPTION

Displays paths that have differences between the index file and the current HEAD commit, paths that have differences between the working tree and the index file, and paths in the working tree that are not tracked by Git (and are not ignored by gitignore(5)). The first are what you would commit by running git commit; the second and third are what you couldcommit by running git add before running git commit.


执行status前我做了哪些动作,

1、修改了1.txt并执行git add 1.txt
2、修改了2.txt,无其他操作
3、新增了3.txt文件,无其他操作

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage) modified: .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: .txt Untracked files:
(use "git add <file>..." to include in what will be committed) .txt 

Changes to be committed: 表示 tracked & modified % in stage waiting for commit 的文件
Changes not staged for commit:表示 tracked & modified & not in stage 的文件
Untracked files:表示 untracked 文件


通过git add 之后,文件都处于 in stage 状态,changes to be commited。

等待提交。

$ git add .

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage) modified: .txt
modified: .txt
new file: .txt

要注意区分各个状态间的差异!

最新文章

  1. Fiddler-2 Fiddler抓包原理
  2. MyScript 手写识别数学公式、图形 自动计算
  3. 六间房 繁星 酷我 来疯 秀吧 新浪秀 直播播放器 Live 1.2
  4. C# 文件读写FileInfo
  5. 图像特征提取三大法宝:HOG特征,LBP特征,Haar特征(转载)
  6. CentOS 编译安装Apache2.4.10
  7. PHP代码为什么不能直接保存HTML文件——&amp;gt;PHP生成静态页面教程
  8. 使用mailto在网页中链接Email地址
  9. hdu 5493 Queue(线段树)
  10. PHP数组与对象之间用递归转换
  11. C# - 重写虚方法
  12. HTML5学习系列之表单与文件
  13. python3 实例方法、类方法和静态方法
  14. iReport 5.6.0 组件面板为空 get小技巧
  15. python中序列化模块json和pickle
  16. DFS CCPC2017 南宁I题
  17. Codeforces Round #189 (Div. 1) C - Kalila and Dimna in the Logging Industry 斜率优化dp
  18. Linux Performance Analysis and Tools(Linux性能分析和工具)
  19. react篇章-React State(状态)
  20. ctf实验平台-成绩单

热门文章

  1. php 类与对象 面向对象编程 简单例子
  2. AngularJS封装UEditor
  3. Ng第十三课:聚类(Clustering)
  4. Curl工具的使用
  5. js-图片轮播
  6. django创建分页
  7. PowerDesigner常用功能介绍
  8. [leet code 100] same tree
  9. bootstrap基础学习小记(一)简介模板、全局样式
  10. 在我朝如何为Brackets安装扩展?