• git add -A stages All
  • git add . stages new and modified, without deleted
  • git add -u stages modified and deleted, without new
 
 
git init
echo Change me > change-me
echo Delete me > delete-me
git add change-me delete-me
git commit -m initial echo OK >> change-me
rm delete-me
echo Add me > add-me git status
# Changed but not updated:
# modified: change-me
# deleted: delete-me
# Untracked files:
# add-me git add .
git status # Changes to be committed:
# new file: add-me
# modified: change-me
# Changed but not updated:
# deleted: delete-me git reset git add -u
git status # Changes to be committed:
# modified: change-me
# deleted: delete-me
# Untracked files:
# add-me git reset git add -A
git status # Changes to be committed:
# new file: add-me
# modified: change-me

"git add -A" is equivalent to "git add .; git add -u".的更多相关文章

  1. Git 学习(三)本地仓库操作——git add & commit

    Git 学习(三)本地仓库操作——git add & commit Git 和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念.这在上文已有提及,本文具体说明什么是工作区及暂存区,以及 ...

  2. Github如何快速添加add文件到暂存区之git add

    git add作用是将代码从工作区提交到暂存区 通常会想到:git add [file1] [file2]   : 这个方法添加文件比较慢,如果文件比较多怎么办? git add *.扩展名 这条命令 ...

  3. Git以及github的使用方法(二)创建仓库,git add添加到“暂储区”,git commit添加到“本地仓库”

    什么是版本库呢?版本库又名仓库,英文名repository,你可以简单理解成一个目录,这个目录里面的所有文件都可以被Git管理起来,每个文件的修改.删除,Git都能跟踪,以便任何时刻都可以追踪历史,或 ...

  4. git --help出来的命令 + eclipse里用git小记

    用法:git [--version] [--help] [-C <path>] [-c name=value]           [--exec-path[=<path>]] ...

  5. git: fatal: Not a git repository (or any of the parent directories): .git

    在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...

  6. Git版本控制管理学习笔记3-基本的Git概念

    为了更近一步的学习和理解Git的理念,这一节介绍一下Git中的一些基本概念. 基本概念 对象库图示 Git在工作时的概念 一.基本概念: 1.版本库:     Git的版本库就是一个简单的数据库,其中 ...

  7. Git / 程序员需要知道的12个Git高级命令

    众所周知,Git目前已经是分布式版本控制领域的翘楚,围绕着Git形成了完整的生态圈.学习Git,首先当然是学习Git的基本工作流.相比于SVN等传统版本控制系统来说,Git是专为分布式版本控制而生的强 ...

  8. fatal: Not a git repository (or any of the parent directories): .git

    $ git remote add origin https://github.com/heyuanchao/YouxibiClient.gitfatal: Not a git repository ( ...

  9. git plumbing 更加底层命令解析-深入理解GIT

    原文: http://rypress.com/tutorials/git/plumbing 本文详细介绍GIT Plumbing--更加底层的git命令,你将会对git在内部是如何管理和呈现一个项目r ...

随机推荐

  1. 理解asp.net中DropDownList编辑数据源,绑定数据库数据。

    一.理解asp.net绑定数据库 终于学习到了连接数据库部分的内容,杨中科老师视频看起来挺轻松的,如果是高清版就更ok了. 我发现我学习新的编程语言会有一个特点,都想要赶紧学习数据库,数据就是一切,有 ...

  2. webbrowser selstart selLength

    附件:http://files.cnblogs.com/xe2011/Webbrowser_SelStart.rar 1 获得webBrowser光标所在的位置 2 设置webBrowser光标的位置 ...

  3. Windows下Memcached在.Net程序中的实际运用(从Memcached客户端Enyim的库的编译到实际项目运用)

    1.一点基础概念 2.获取EnyimMemcached客户端的源代码并编译出动态库 3.Memcached的服务器安装(windows server) 4.在web项目中实战 一.基础概念 memca ...

  4. display_errors & error_reporting(php调试安全)

    这两个选项对应的值即都可以在php.ini文件中设置,也都可以在php代码中使用相应的函数来设置. 在php.ini文件中的设置如下:

  5. oracle常用数据类型

    oracle中常用数据类型分为三大类:

  6. CXF整合Spring开发WebService

    刚开始学webservice时就听说了cxf,一直没有尝试过,这两天试了一下,还不错,总结如下: 要使用cxf当然是要先去apache下载cxf,下载完成之后,先要配置环境变量,有以下三步: 1.打开 ...

  7. Python学习入门教程,字符串函数扩充详解

    因有用户反映,在基础文章对字符串函数的讲解太过少,故写一篇文章详细讲解一下常用字符串函数.本文章是对:程序员带你十天快速入门Python,玩转电脑软件开发(三)中字符串函数的详解与扩充. 如果您想学习 ...

  8. js去掉所有空格

    <script> String.prototype.trim = function () {            return this.replace(/(^\s*)|(\s*$)/g ...

  9. 利用Inltellj创建javadoc ,用jd2chm创建chm

    现在有些框架都不带javadoc 就需要自己去生成,而且真正用起来还是chm的最方便,所以写篇日志记录一下 下面我就拿struts2的源码来来举个栗子 1.第一步:创建一个空的java项目,导入框架源 ...

  10. <script runat=server>、<%%>和<%#%>的区别

    ①<script runat="server">代码段与<%%>内联代码段的区别 在asp.net页面的aspx文件中允许使用<script runa ...