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关键字用来 ...
随机推荐
- POJ 2777 Count Color (线段树成段更新+二进制思维)
题目链接:http://poj.org/problem?id=2777 题意是有L个单位长的画板,T种颜色,O个操作.画板初始化为颜色1.操作C讲l到r单位之间的颜色变为c,操作P查询l到r单位之间的 ...
- 下载Xml文件方法
#region 下载Xml文件方法 //定义委托 private delegate void DownLoadDelegate(string url, string filename); privat ...
- struts2的action的知识点和利用action向页面注入值的操作
1. Action的顺序,会先搜索指定名字下的包的action,如果找不到会去搜索默认路径下的包下的action. 2. 如果没有给action设置值,那么action会有一些默认 ...
- android SoundPool播放音效
MediaPlayer的缺点: 资源占用量高,延时时间较长 不支持多个音效同一时候播放 SoundPool主要用于播放一些较短的声音片段,CPU资源占用率低和反应延时小,还支持自行色设置声音的品质,音 ...
- [AngularJS] ui-router: Abstract States
ui-router has the powerful ability to define abstract states, or states that can't be navigated to, ...
- iOS开发——网络编程Swift篇&(八)SwiftyJSON详解
SwiftyJSON详解 最近看了一些网络请求的例子,发现Swift在解析JSON数据时特别别扭,总是要写一大堆的downcast(as?)和可选(Optional),看?号都看花了.随后发现了这个库 ...
- perl 变量详解
http://www.perlmonks.org/?node_id=933450 use strict; use Devel::Peek; my $a; Dump($a); $a=4; Dump($a ...
- PAT 1021
1021. Deepest Root (25) A graph which is connected and acyclic can be considered a tree. The height ...
- 【张泽华】android视频教程下载地址及上课源代码
http://note.youdao.com/share/?id=f39bf918842c7b0673a033d35d734073&type=notebook#/1AC357745ED74BC ...
- debian之source.list详解
之前安装的是debian sarge(内核是2.4.7),不太想更新,但是发现原来的源/ect/apt/source.lists如下,但是用apt-get update,发现大都已经不可用了.怎么办, ...