git - 什么 git add -A -- 。意思是

标签 git visual-studio-code

我认为我在 vscode 控制台中看到了 git commit

git add -A -- .

我知道了

git add -A

表示

但是什么

git add -A -- .

是什么意思?

最佳答案

来自documentation :

--

This option can be used to separate command-line options from the list of files, (useful when filenames might be mistaken for command-line options).

这是不言自明的。此外,. 表示当前目录。

因此该命令实际上意味着暂存所有文件,即“将当前目录和子目录中的所有跟踪和未跟踪文件(包括删除)添加到 git 索引”。

关于git - 什么 git add -A -- 。意思是,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52352967/

相关文章:

visual-studio-code - 使用 lldb 在 VS Code 中调试,如何在没有源代码的符号上设置断点?

visual-studio-code - 在 vscode 中添加特定于语言的图标

types - Spark Ar Code 自动完成功能在 Visual Studio Code 中不起作用

git - 在 git 中压缩提交是什么意思?

git - 停止 git gc --aggressive,这是一件坏事吗?

linux - 如何在 TFS 服务器的 linux 代理中运行 shell 脚本

visual-studio-code - PATH 命令中的 Visual Studio 代码 "Shell Command: Install ' 代码'命令。”

c++ - 如何让 VS Code 识别 'constexpr' ?

git - 如何从历史记录中删除已发布的 Git 提交?

git - 使用git branch进行在线开发和测试