子模块更新失败,最新更新

Submodule update fails with latest update

自从我将 TortoiseGit 更新到最新的 2.7.0.0 版本后,子模块更新 现在失败并且 returns 以下。

git.exe submodule update --progress --init --recursive --force --merge --remote -- "src/myproject"

usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--reference <repository>] [--recursive] [--] [<path>...]
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]


git did not exit cleanly (exit code 1) (827 ms @ 9/13/2018 11:05:54 AM)

我不使用命令行,我使用 TortoiseGit 上下文菜单。

我总是可以进入 Git Bash 此处 并输入以下命令,但我想知道为什么从上下文菜单中执行此操作会出错.

git submodule update --init --remote -f --recursive Src

cli 命令行有所不同:在 TortoiseGit 中你已经检查了 merge 选项,在 Git bash 中你没有。如果您在 Git 配置中设置了 checkoutrebase,这可能会导致不兼容。

也许这与:https://tortoisegit.org/issue/3218

有关

感谢MrTux

在您发布 link 之后,我最终发表了该评论:

Sven Strickroth @mrtux · 1 个月前 所有者 您是否检查过 TortoiseGit 使用 Git 的 "right" 版本?也许您安装了另一个无法处理配置值的旧版本。

答案是将我的 GIT 版本从 2.08 更新到最新的 2.19。为此,我刚刚下载了 executable,它自动升级了我的 GIT。