Git CMD - status: Show the working tree status
命令参数
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的更多相关文章
- 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 ...
- 痞子衡嵌入式:第一本Git命令教程(3)- 变动(status/diff)
今天是Git系列课程第三课,前两课我们都是在做Git仓库准备工作,今天痞子衡要讲的是如何查看Git空间内发生的改动. 本地有了仓库,我们便可以在仓库所在目录下做文件增删改操作,为了确定改动操作的正确性 ...
- git 基本操作小节操作(一) init clone status add 未完,参考链接在末尾
1 $ git init 对当前所在目录进行git 管理 在当前目录初始化新仓库 2 $ git clone <url> <position> 从url克隆一个仓库到posti ...
- Git CMD - diff: Show changes between commits, commit and working tree, etc
命令格式 git diff [options] [<commit>] [--] [<path>…] git diff [options] --cached [<comm ...
- Git CMD - rm: Remove files from the working tree and from the index
命令格式 git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] <file>… 命令参 ...
- Git CMD - checkout: Switch branches or restore working tree files
命令格式 git checkout [-q] [-f] [-m] [<branch>] git checkout [-q] [-f] [-m] --detach [<branch&g ...
- 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 ...
- OpenStack git cmd
文件流转的三个工作区域:Git 的工作目录,暂存区域,以及本地仓库. 基本的 Git 工作流程如下: 在工作目录中修改某些文件. 对修改后的文件进行快照,然后保存到暂存区域. 提交更新,将保存在暂存区 ...
- RobotFramework自动化测试框架-移动手机自动化测试Get Network Connection Status和Set Network Connection Status关键字的使用
Get Network Connection Status关键字用来获取手机的网络连接状态.在获取到连接状态后,会返回不同的数字. Set Network Connection Status关键字用来 ...
随机推荐
- HDU 3665 Seaside (最短路,Floyd)
题意:给定一个图,你家在0,让你找出到沿海的最短路径. 析:由于这个题最多才10个点,那么就可以用Floyd算法,然后再搜一下哪一个是最短的. 代码如下: #pragma comment(linker ...
- 【Java】JDBC编程套路
转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/5847020.html 学习Java开发,一个必须掌握的知识点,就是数据库操作.当程序需要用到的数据达到一定程度 ...
- 介绍50个 WordPress 动作挂钩
WordPress 之所以能成为世界上最受欢迎的网页内容管理系统,原因就在于它的高度灵活性和可塑性,而这种灵活性和可塑性正是由“挂钩”(Hooks)简洁宜用的结构所决定的.可以说,没有过滤挂钩(Fil ...
- The plot Function in matlab
from http://pundit.pratt.duke.edu/wiki/MATLAB:Plotting The plot Function The plot function is used t ...
- [置顶] iOS开发规范
iOS代码编程规范 详细讲解代码该如何写,怎样写,如何规范. 什么样的代码是最美的,本文档会给你讲解 iOS代码编程规范........................................ ...
- Python写的东西在CMD下打印中文
以前遇到的问题是在IDLE中可以print出中文,在cmd却是乱码. 后来想明白,IDLE中默认编码是unicode,而cmd中是ANSI,即cp963,即GBK 所以这样就能输出中文了: s = “ ...
- POJ 3261 Milk Patterns 可重复k次的最长重复子串
Milk PatternsTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://poj.org/problem?id=3261 Description ...
- Communications link failure报错的处理
一.报错的问题: 测试环境在做压力测试的时候爆出错误 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications l ...
- Pimp_my_Z1
https://github.com/Androguide/Pimp_my_Z1 Pimp_my_Z1-master.zip
- mysql router 自动failover测试
mysql router 启动服务文件内容: [root@monitor mysqlrouter]# cat /etc/init.d/mysqlrouter#! /bin/bash## mysqlro ...