"git add -A"和"git add -A"之间有什么区别?和"git add --update:/"? [英] What is the difference between "git add -A" and "git add --update :/"?

查看:80
本文介绍了"git add -A"和"git add -A"之间有什么区别?和"git add --update:/"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我过去曾经使用此Git命令来处理文件:

I was in the past using this Git command for my files:

add --update :/ 

正如某人告诉我的那样,这是拾起所有已添加,删除和更新的文件的最佳方法.

as someone told me this was the best way to pick up all the files that had been added, deleted and updated.

但是在阅读之后:" git之间的差异添加-A和"git add".

我认为也许我应该使用git add -A

I think maybe I should be using git add -A

有人可以告诉我,有什么区别吗?git add --update :/到底有什么作用?

Can someone tell me if there's a difference and what git add --update :/ actually does?

推荐答案

git add --update :/将从整个工作树中更新或删除以前跟踪的文件.它不会添加新文件.

git add --update :/ will update or remove previously tracked files from the entire working tree. It will not add new files.

git add -A还将更新,删除以前跟踪的文件,但也会添加新文件.由于此命令没有明确的 pathspec :/中的>,这取决于您的git版本,这可能适用于整个工作树中的所有文件,也可能适用于当前目录以及所有子文件夹和文件.

git add -A will also update, remove previously tracked files, but it will also add new files. As this command doesn't have the explicit pathspec of :/ that your update command does, depending on your version of git, this may be for all files in the entire working tree, or it may be for the current directory and all subfolders and files.

有关更多信息,可以找到git add的文档: http://git-scm .com/docs/git-add

For more info, the docs for git add can be found: http://git-scm.com/docs/git-add

这篇关于"git add -A"和"git add -A"之间有什么区别?和"git add --update:/"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆