命令参数

git status [<options>…​] [--] [<pathspec>…​]

命令格式

--short, -s
  短格式输出。

-- long
  长格式输出,默认选项。

实例

a) 查看工作树的状态

[huey@huey-K42JE hello_git]$ git status
# On branch master
nothing to commit (working directory clean)
[huey@huey-K42JE hello_git]$ date > datetime.txt
[huey@huey-K42JE hello_git]$ touch testfile.txt
[huey@huey-K42JE hello_git]$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: datetime.txt
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# testfile.txt
no changes added to commit (use "git add" and/or "git commit -a")
[huey@huey-K42JE hello_git]$ git add .
[huey@huey-K42JE hello_git]$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: datetime.txt
# new file: testfile.txt
#
[huey@huey-K42JE hello_git]$ git commit -m "change datetime & new testfile.txt"
[master 5944238] change datetime & new testfile.txt
1 files changed, 1 insertions(+), 1 deletions(-)
create mode 100644 testfile.txt
[huey@huey-K42JE hello_git]$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

Git CMD - status: Show the working tree status的更多相关文章

  1. Git GUI,Git Bash,Git CMD之间的区别

    Git GUI,Git Bash,Git CMD之间的区别 Git Bash: Bash,Unix shell的一种,Linux与Mac OS X v10.4都将它作为默认shell.Git Bash ...

  2. 痞子衡嵌入式:第一本Git命令教程(3)- 变动(status/diff)

    今天是Git系列课程第三课,前两课我们都是在做Git仓库准备工作,今天痞子衡要讲的是如何查看Git空间内发生的改动. 本地有了仓库,我们便可以在仓库所在目录下做文件增删改操作,为了确定改动操作的正确性 ...

  3. git 基本操作小节操作(一) init clone status add 未完,参考链接在末尾

    1 $ git init 对当前所在目录进行git 管理 在当前目录初始化新仓库 2 $ git clone <url> <position> 从url克隆一个仓库到posti ...

  4. Git CMD - diff: Show changes between commits, commit and working tree, etc

    命令格式 git diff [options] [<commit>] [--] [<path>…​] git diff [options] --cached [<comm ...

  5. Git CMD - rm: Remove files from the working tree and from the index

    命令格式 git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>…​ 命令参 ...

  6. Git CMD - checkout: Switch branches or restore working tree files

    命令格式 git checkout [-q] [-f] [-m] [<branch>] git checkout [-q] [-f] [-m] --detach [<branch&g ...

  7. Git CMD连接,管理(remote,add,commit,push)github repository

    git initmd testcd testgit statusgit add test  //git add test/a.txtgit status git remote add origin g ...

  8. OpenStack git cmd

    文件流转的三个工作区域:Git 的工作目录,暂存区域,以及本地仓库. 基本的 Git 工作流程如下: 在工作目录中修改某些文件. 对修改后的文件进行快照,然后保存到暂存区域. 提交更新,将保存在暂存区 ...

  9. RobotFramework自动化测试框架-移动手机自动化测试Get Network Connection Status和Set Network Connection Status关键字的使用

    Get Network Connection Status关键字用来获取手机的网络连接状态.在获取到连接状态后,会返回不同的数字. Set Network Connection Status关键字用来 ...

随机推荐

  1. POJ 3673 Cow Multiplication (水题)

    题意:给你两个数,求所有的数位的积的和. 析:太水了,没的说,可以先输入边算,也可以最后再算,一样.. 代码如下: #include <cstdio> #include <strin ...

  2. 学习php 韩顺平

    1.动态语言的发展史 最早使用cgi 学习 apache  全世界最流行的web服务器 php运行流程 → apache→php文件→数据库→php文件→浏览器 php底层语言是c语言 jsp底层语言 ...

  3. SAE搭建WordPress教程 免费建WordPress博客站

    SAE搭建WordPress教程 免费建WordPress博客站 WordPress是一种使用PHP语言开发的博客平台,用户可以在支持PHP和MySQL数据库的服务器上架设自己的网志.当然,用户也可以 ...

  4. 《解剖PetShop》系列转载

      1 <解剖PetShop>系列之六 PetShop之表示层设计    http://ityup.com/showtopic-8.html 2 <解剖PetShop>系列之五 ...

  5. C++ AfxBeginThread

    计算从1+2+3...+100000=? 关键点 CWinThread* AfxBeginThread( AFX_THREADPROC pfnThreadProc, LPVOID pParam, in ...

  6. ClassLoader使用记录《安卓高手之路》

    我不喜欢那些泛泛而谈的去讲那些形而上学的道理,更不喜欢记那些既定的东西.靠记忆去弥补思考的人,容易陷入人云亦云的境地,最后必定被记忆所围困,而最终消亡的是创造力.希望这个高手之路系列能够记录我学习安卓 ...

  7. 怎样破解邮箱password

    破解邮箱password怎样破解邮箱password邮箱在我们的生活中日益成为一个不可或缺的角色.公司与公司之间的商贸往来,学生与老师间的学习交流,以及占非常大部分的私人信件的往来等等非常难离开它.但 ...

  8. show engine innodb status解读

    xiaoboluo768   注:以下内容为根据<高性能mysql第三版>和<mysql技术内幕innodb存储引擎>的innodb status部分的个人理解,如果有错误,还 ...

  9. MySQL并发复制系列二:多线程复制

     http://blog.itpub.net/28218939/viewspace-1975822/ 并发复制(Parallel Replication) 系列二: Enhanced Multi-th ...

  10. C#的空接合运算符 三目运算符

    1.空接合运算符:操作数1??操作数2: 2.第一个操作数必须是一个可空类型或引用类型,第二个操作数必须与第一个操作数类型相同,或者可以隐含的转换为第一个操作数的类型: 3.如果第一个操作数不为nul ...