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关键字用来 ...
随机推荐
- Codeforces Round #260 (Div. 1) A. Boredom (简单dp)
题目链接:http://codeforces.com/problemset/problem/455/A 给你n个数,要是其中取一个大小为x的数,那x+1和x-1都不能取了,问你最后取完最大的和是多少. ...
- Contest 7.21(贪心专练)
这一次都主要是贪心练习 练习地址http://acm.hust.edu.cn/vjudge/contest/view.action?cid=26733#overview Problem APOJ 13 ...
- HDU 4438 Hunters (数学,概率计算)
题意:猎人A和B要进行一场比赛.现在有两个猎物老虎和狼,打死老虎可以得X分,打死狼可以得Y分.现在有两种情况: (1)如果A与B的预定目标不同,那么他们都将猎到预定的目标. (2)如果A与B的预定目标 ...
- thinkPHP模板的输出和模型的使用
a.通过 echo 等PHP原生的输出方式在页面中输出 b.通过display方法输出 想分配变量可以使用assign方法 c.修改左右定界符 休要修改配置文件中的配置项 'TMPL_L_DELIM' ...
- 使用Github遇到的问题及解决办法
问题一: 当push代码上去仓库时,出现 ! [rejected] master -> master (fetch first) error: failed to push som ...
- Node.js Crypto 加密算法库
Crypto库是随Nodejs内核一起打包发布的,主要提供了加密.解密.签名.验证等功能.Crypto利用OpenSSL库来实现它的加密技术,它提供OpenSSL中的一系列哈希方法,包括hmac.ci ...
- securecrt 连接vmware ubuntu
折腾了好几天,我只想说shit,吃一堑长一智,和大家分享. SecureCRT连接Linux是使用Ubuntu下的SSH服务,ssh包括客户端和服务端即openssh-client,openssh-s ...
- ADO.NET 快速入门(十三):使用 OLE DB 检索数据
OleDbDataReader 类提供了一种从数据源读取数据记录只进流的方法.如果想使用 SQL Server 7.0 或者更高版本,请参考文章:使用 SQL Server 检索数据. OleDb ...
- Get-ChildItem参数之 -Exclude,Filter,Recurse应用
$p = "D:\PSScript" gci $p -Exclude "UpdateLog" #排除子目录"UpdateLog",但是后面不 ...
- linux php开启openssl
1.测试openssl是否安装查看版本 openssl version查看路径 which openssl2.因为要扩展php扩展模块,所以要通过phpize可以建立php的外挂模块find / ...