Git学习笔记之git add

git add   --  Add file contents to the index.

      添加文件内容到索引(暂存区)。

Before running the commit command, you must use the add command to add new or modified files to the index.

在运行git commit命令之前,必须用git add命令将新的或者修改过的文件添加到索引(暂存区)。

Options:


-n,--dry-run

Don`t actually add the file(s), just show if they exist and/or will be ignored.

并不是真正的添加文件,只是显示它们是否存在或者被忽略。

-v, --verbose

Be verbose.

使用啰嗦模式执行命令。

-f, --force

Allow adding otherwise ignored files.

允许添加另外被忽略的文件。

-i, --interactive

Add modified contents in the working tree interactively to the index. Optional path arguments may be supplied to limit operation to a subset of the working tree. See "Interactive mode" for details.

交互式添加工作树中的内容到索引(暂存区)中。可选择的路径参数可能会应用到工作树子集的限制性操作中。具体查看“Interactive mode”。

-p, --patch

Interactively choose hunks of patch between the index and the work tree and add them to index. This gives user a chance to review the difference before adding modified contents to the index.

能力有限,日后更新。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值