空字符串不是有效的路径规范
empty string is not a valid pathspec
看完Git - git-submodule Documentation,我决定将我之前项目的两个文件导入到我新项目的根目录下,因为我不想手动同步这两个文件。
但是,当我执行以下命令时出现错误:
$ git submodule add -b master -f --name latexci -- https://github.com/donizyo/LaTeX-Travis.git .
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
usage: git submodule--helper clone [--prefix=<path>] [--quiet] [--reference <repository>] [--name <name>] [--depth <depth>] --url <url> --path <path>
--prefix <path> alternative anchor for relative paths
--path <path> where the new submodule will be cloned to
--name <string> name of the new submodule
--url <string> url where to clone the submodule from
--reference <repo> reference repository
--dissociate use --reference only while cloning
--depth <string> depth for shallow clones
-q, --quiet Suppress output for cloning a submodule
--progress force cloning progress
我正在使用 Git Bash 2.19.1.windows.1 来执行 git 命令。
路径(.
)应该是一个不存在的文件夹,例如Latex-Travis
。
相反,此处“.
”被解释为空路径(因为它引用了您的父存储库),如 ruby-git/ruby-git
issue 345:
中所示
This really was deprecated since Git 2.1.6:
An empty string as a pathspec element that means "everything" i.e. 'git add ""', is now illegal. We started this by first deprecating and warning a pathspec that has such an element in 2.11 (Nov 2016).
我不知道直接在父仓库文件夹中添加了子模块:我以前总是添加为父仓库 子文件夹。
看完Git - git-submodule Documentation,我决定将我之前项目的两个文件导入到我新项目的根目录下,因为我不想手动同步这两个文件。 但是,当我执行以下命令时出现错误:
$ git submodule add -b master -f --name latexci -- https://github.com/donizyo/LaTeX-Travis.git .
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
usage: git submodule--helper clone [--prefix=<path>] [--quiet] [--reference <repository>] [--name <name>] [--depth <depth>] --url <url> --path <path>
--prefix <path> alternative anchor for relative paths
--path <path> where the new submodule will be cloned to
--name <string> name of the new submodule
--url <string> url where to clone the submodule from
--reference <repo> reference repository
--dissociate use --reference only while cloning
--depth <string> depth for shallow clones
-q, --quiet Suppress output for cloning a submodule
--progress force cloning progress
我正在使用 Git Bash 2.19.1.windows.1 来执行 git 命令。
路径(.
)应该是一个不存在的文件夹,例如Latex-Travis
。
相反,此处“.
”被解释为空路径(因为它引用了您的父存储库),如 ruby-git/ruby-git
issue 345:
This really was deprecated since Git 2.1.6:
An empty string as a pathspec element that means "everything" i.e. 'git add ""', is now illegal. We started this by first deprecating and warning a pathspec that has such an element in 2.11 (Nov 2016).
我不知道直接在父仓库文件夹中添加了子模块:我以前总是添加为父仓库 子文件夹。