Git CMD

命令格式

git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
    [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
    [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
    [--] [<pathspec>…​]

命令参数

--verbose, -v
  详细模式。

实例

a) 添加文件至暂存区

[huey@huey-K42JE hello_git]$ date > datetime.txt
[huey@huey-K42JE hello_git]$ git add datetime.txt 

b) 添加当前目录的所有文件至暂存区

[huey@huey-K42JE hello_git]$ mkdir src
[huey@huey-K42JE hello_git]$ echo -e '#!/usr/bin/python
print "hello world"' > src/hello.py
[huey@huey-K42JE hello_git]$ git add .

更多

http://git-scm.com/docs/git-add

原文地址:https://www.cnblogs.com/huey/p/5088782.html