接着上篇 git的使用(一) http://www.cnblogs.com/horizonli/p/5323363.html

6.工作区和暂存区(中转站)

  工作区(Working Directory)

  就是你在电脑里能看到的目录:

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR8AAACECAIAAAAm47guAAAMOklEQVR4nO2du08bSxuH/RfQu0iPlDISBR19JJeRoHHllj7FCTeDuSyY3LkZsI27r7NQ0gSlo3WU6HxfUHSiKEq4LCEXZb3rXYevGHs87K7t8YtngOPfoy283vHOxfvM+84YJZFzAIAaIlfdAAD+tcAuAFQBuwBQBewCQBWR/wEA1IDYBYAqYBcAqoBdAKgCdgGgivZ2FYtFwzDOz88tyxoeHjZNM7SYaZp37twJXjVNMxqNRiKRvr6+UqnE3jQMIxqNNrvV5TEMo1gsstelUml0dDRYhveLn8bjcUXtuYmUSqVbt27xrwwQuJRdxWIx0hz2fJumOTw8fHp6GovFkslksNjQ0JBlWV3skq+d8XicmyYyOjrKHh32orVdlmUNDQ2J9ymVSv39/aZpsku8O+Ks0eJSEMMw4vG47yPi4MTjcXE6UA3sujxN7bIsKxaLsccuaBd7ZMUn0he7ePQQ7dLwVRmGwR/Nvr6+vb09Fjl9z2upVIrFYpZlseZZlnVJu/glNuOw0xaXfPD2BCsS26BnDIP1NmvSNYfQ8u52tmO73r9/H41G2TuSdomZIVe0WSYZ2pKXL196nifZJTEt9M33/JQFivMm4TcYIuTtkrzkuz8PsK2/Xcn0tdMRa3u362NXR127GXaxZ25gYGBgYEBcPnWaGe7v7zM/79y5c/fuXeZt2568ePFibGwsn8/LjCmzd29vj1XHAgKrSIxX0WiUpWE8GnQrdomFW1wKHepmFfEMjXehiyN2fnEGTCaTPLz39/ezybRZDs9am81mo9Eou8pvxScpsYz4YIj1tk2bCV0Tb96sbedCshONRlt3lgAxM2R0mhkyu0zT5B+UscvzvHw+LzmmbA/D9xT6NjAMwxgZGWHF+IaHjF2+6YM9EJe3Sxw6X0VsUuB2SQb8jkaMPXNi5BTtCu2grztcDNM0+/v7fdO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OSp63rlsq0iM5yEXcqAXRS02/XEdT2JGCUbssTYNTmV1NmXngJ2UdBs16PHndrV3itu1wTsUgbsoqDdrsfMLhWZ4cTklM6+9BSwi4Jmux4+etwudpUtSzZe+WLXOOxSBuyioN2uR2F21YwiSHXBrolJnX3pKWAXBc12LT985LquZZVVZIZjsEsZsIuCZrvSDx9WXJccoFrHrgfjEzr70lPALgq67VqGXTcS2EVBs11Ly8sX/uPJrh5/jY3r7EtPAbso6LYrvbyYTi8uLRmLS8bi4oKxOG8Y8wvG/IIxN78wOz8/OzefmptLzc7NzM5Op2anU6npmVRyemZqemYqOT2ZnJ6cSk5MJScmp8Ynp8YnJscmJh+MTzwYn/hrbBx2qQN2UdBsF7ihwC4KsAvIALsowC4gA+yiALuADLCLAuwCMsAuCrALyAC7KFwju3YTkcH0wVW3AoQCuyjALiAD7KLwb7TrID0YSezSroJwYBcF2AVkgF0UumEXe153E5FIXY/dRKRGw5eD9GD9TeHhbpSMXPj4YHq3Vj6x2ygl2BdWhe+GtXvUattNRCKJhHj10h3vIWAXhW7ZJSgjxiAeKA7Sifp7u4l64car2okoJ3vNZGGFGlEntIoL7fG3pvEJxC4KsItC92JX/exiNBJjiz96+VLBxql4Iex18ypC2lMr3cJG0B7YRUGJXcHl00F6MBIIHpexq9UKDXZ1H9hFoft2+fM9v0gHjbWQWFL0r51doVUcpAdrV0Myw8ZF2EUCdlFQYFfoBkbjrcFEolFc3JtIS8eu0Cp8AtVveeE9riF2NToEdlG4Rjvy4BoDuyjALiAD7KIAu4AMsIsC7AIywC4KsAvIALsowC4gA+yiALuADLCLAuwCMsAuCrALyAC7KMAuIAPsogC7gAywiwLsAjLALgqwC8gAuyjALiAD7KIAu4AMsIsC7AIywC4KsAvIALsowC4gA+yiALuADLCLAuwCMsAuCrALyAC7KMAuIAPsogC7gAywiwLsAjLALgqwC8gAuyjALiAD7KIAu4AM/wdd4QwWE5PVCgAAAABJRU5ErkJggg==" alt="" />

  版本库(Repository)

  工作区有一个隐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W4bgFnES3DIEt4iT4JYhuEWcBLcMwS3iJLhlCG4RJ8EtQ3CLOAluGYJbxElwyxDcIk6CW4bgFnES3DIEt4iT4JYhuEWcBLcMwS3iJLhlCG4RJ8EtQ3CLOAluGYJbxElwyxDcIk6CW4bgFnES3DIEt4iT4JYhuEWcBLcMwS3iJLhlCG4RJ8EtQ3CLOAluGYJbxElwyxDcIk6CW4bgFnES3DIEt4iT4JYhuEWcBLcMwS3iJLhlCG4RJ8EtQ3CLOAluGYJbxElwyxDcIk6CW4bgFnES3DIEt4iT4JYhuEWcBLcMwS3iJLhlCG4RJ8EtQ3CLOAluGYJbxElwyxDcIk6CW4bgFnES3DIEt4iT4JYhuEWcBLcMwS3iJLhlCG4RJ8EtQ3CLOAluGYJbxElwyxDcIk6CW4bgFnES3DIEt4iT4JYhuEWcBLcMwS3iJLhlCG4RJ8EtQ3CLOOn/AYZCIout/GPMAAAAAElFTkSuQmCC" alt="" />

--------------------------------------------------------------------------------

  Git的版本库里存了很多东西,其中最重要的就是称为stage(或者叫index)的暂存区(中转站),

  还有Git为我们自动创建的第一个分支master,以及指向master的一个指针叫HEAD

  aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkAAAADfCAIAAACRV/veAAAgAElEQVR4nO2d2XPbVp7v9Rfk3Q/znqqp6pfuStXoPvX7VLmqX6YqqZ7rmbmjO90zmXR3Fm+xLWvfKFGyJWuldrt7euaO3W2rk4mTyHEn7cRxbNnWSkmkKHEHSXABQSwk7gNIELtIkAQOyd+n+CCBEIkvgPP7nHMAkS0cAAAAANQhLVZvAAAAAAAYAQQGAAAA1CUgMAAAAKAuadkFAAAAakkptdjqbawbJAKrjRcBAAAah93SJFTJ31byFs0DCAwAAKA8QGCIAAIDAAAoDxAYIoDAAAAAygMEhghGBHb//n2bzcZxXDqdfvvttzEMU10Nw7Af//jHymcxDDtz5kxLS8sbb7yxsbHBL7TZbGfOnNF6qcqx2Wz379/nf97Y2HjvvfeU6wi5hF/PnTtXo+2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w6wCBAfVFzb96tGkBgRkEBAYAAGAtIDCDgMAAAACsBQRmEBAYAACAtYDADAICAwAAsBYQmEFAYAAAANYCAjMICAwAAMBaQGAGAYEBAABYCwjMICAwAAAAawGBGQQEBgAAYC0gMIOAwAAAAKwFBGYQEBgAAIC1gMAMAgIDAACwFhCYQUBgAAAA1gICMwgIDAAAwFr+P4b6VGs0YT13AAAAAElFTkSuQmCC" alt="" />

          

[实践出真知]

 readme.txt增加一句:Git has a mutable index called stage.  并增加一个文本文件LICENSE
$ cat readme.txt
Git is a distributed version control system.
Git is free software distributed under the GPL.
Git has a mutable index called stage. $ echo "this is a text" >> LICENSE
$ cat LICENSE
this is a text

结果应该是在工作区 更改了readme.txt,并增加了一个文本文件LICENSE

$ git status                                                            #查看工作区所有文件的状态
On branch master
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: readme.txt #表示此文件被修改,未被提交到中转站(暂存区) Untracked files: #Untracked表示此文件放置在工作区未提交
(use "git add <file>..." to include in what will be committed) LICENSE no changes added to commit (use "git add" and/or "git commit -a")

两次add,将readme.txt和LICENSE加入到暂存区

$ git add readme.txt

$ git add LICENSE
warning: LF will be replaced by CRLF in LICENSE.
The file will have its original line endings in your working directory. $ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage) new file: LICENSE
modified: readme.txt

---------------------------------------------------------------------------

从中转站(暂存区)提交代码到.git 仓库

$ git commit -m "understand how stage/index works"                   #从中转站(暂存区)提交代码到.git 仓库
[master 3c8d3b2] understand how stage/index works
warning: LF will be replaced by CRLF in LICENSE.
The file will have its original line endings in your working directory.
files changed, insertions(+)
create mode LICENSE $ git status #验证是否都提交,工作区是否clean
On branch master
nothing to commit, working directory clean

 
 参考git教程:http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000

[原]git的使用(二)---工作区和暂存区的更多相关文章

  1. Git学习笔记二--工作区和暂存区

    Git和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念. 简单理解: 我们使用mkdir Git在d盘下创建的文件夹,就是工作区,我们编辑readme.txt文件就是在工作区下完成的: gi ...

  2. 【Git】三、工作区、暂存区、版本库

    一.基础概念 工作区:电脑中可以看到的目录,为电脑中的项目文件 暂存区:暂存修改的地方 版本库:存放项目的各个版本文件 二.详细介绍 工作区为我们工作所使用的目录,在工作区我们对项目文件进行增删改查. ...

  3. Git时光机穿梭之工作区和暂存区

    Git和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念. 先来看名词解释. 工作区(Working Directory) 就是你在电脑里能看到的目录,比如我的learngit文件夹就是一个工 ...

  4. git中的版本库,暂存区和工作区

  5. 【Git】(1)---工作区、暂存区、版本库、远程仓库

    工作区.暂存区.版本库.远程仓库 一.概念 1.四个工作区域 Git本地有四个工作区域:工作目录(Working Directory).暂存区(Stage/Index).资源库(Repository或 ...

  6. git工作区、暂存区、版本库之间的关系

    区分三者关系 Git最让你迷惑的无非是它里面的各种概念了,如果是刚开始接触Git希望看完本篇介绍之后有一个清晰的认识,笔者认识也有限这里只说说个人对使用Git的感受,说一下它里面的几个最常用的概念的理 ...

  7. git(工作区,暂存区,管理修改,撤销修改,删除文件)

    工作区和暂存区 984次阅读 Git和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念. 先来看名词解释. 工作区(Working Directory) 就是你在电脑里能看到的目录,比如我的l ...

  8. [git]入门-工作区、暂存区、版本库

    转载整理自:https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/0013743256 ...

  9. 理解git工作区和暂存区

    版本库 在工作区目录中有一个.git文件,这个其实不是工作区而是Git的版本库 版本库中包含两个部分,一个是暂存区index/stage,另一个是git自动为我们创建的第一个分支master,以及一个 ...

随机推荐

  1. 正则表达式awk

    以冒号: 为分隔符打印出来:打印第一段$1:  -F 分隔符 [root@localhost awk]# awk -F ':' '{print $1}' test.txt root bin daemo ...

  2. Java编程思想学习笔记——初始化与清理

    初始化 构造器保证初始化 构造器采用与类相同的名称. 默认构造器(default constructor):不接受任何参数的构造器,也叫无参构造器. 构造器也能带有形式参数,就能在初始化对象时提供实际 ...

  3. 解决网页响应慢,waiting(TTFB)时间过长

    今天下午发现写的一个功能里,ajax等待时间过长 可以看到是waiting(TTFB)时间过长要1秒左右 用浏览器打开PHP页面测试,还是同样问题 将该接口的数据,都注释掉 发现是pdo连接数据库造成 ...

  4. 关于High-Contrast的资料

    SystemParameters.HighContrast Propertyhttp://msdn.microsoft.com/en-us/library/system.windows.systemp ...

  5. 英文版Ubuntu18.10安装搜狗输入法过程(图文并茂,亲自尝试!)

    英文版Ubuntu18.10安装搜狗输入法过程 过程比较艰辛,折腾了好长的时间,不过最终还是装好了,特记录一下! 首先去搜狗输入法网址下载Linux版本:https://pinyin.sogou.co ...

  6. 解决 iOS7 通过tag 找不到 UITableViewCell 的子控件(转)

    转自:http://www.cnblogs.com/waiwaibuzhidao/p/3340400.html 当iOS7问世,程序的世界就混乱了,以前良好的程序,现在是一塌糊涂,于是只能把问题一个一 ...

  7. sql 理解

    select b.*,  b.model_ent_name+cast(m.year as varchar)as modelname, m.index_value as val into #tb fro ...

  8. Java实现快速批量移动文件

    文件移动是计算机资源管理常用的一个操作,这在操作系统中可以通过文件的剪切与复制或鼠标拖动来实现.但是在Java文件的编程实现中,大多是通过复制文件到目的地,再删除所有文件来实现的.这对于小文件来说看不 ...

  9. json_encode让URL内容斜杠/不转义

    同事在开发接口的时候根据接口提示要求传参一个字符串json,该json格式中有URL数组,按照json_encode编码后总发现 http://变成了 http:\/\/  .URL的斜杠自动的被转义 ...

  10. swift--使用URLSession异步加载图片

    NSURLConnection,在ios9.0以后被废弃,以后使用URLSession类,如下图 具体样例: self.imageV.frame = CGRect(x:,y:,width:kScree ...