如何在 Smartgit 客户端上禁用此消息 `An error-prone admin area configuration`?
How to disable this message `An error-prone admin area configuration` on Smartgit client?
配置正确,
我在文件夹 D:\
上有一个父 git 存储库,
与子模块 Packages/ANSIescape
,
虽然我在文件夹 D:\Packages
.
上还有一个不相关的 git 存储库
1/73: The submodule at 'Packages/ANSIescape' has an error-prone admin area configuration.
For the submodule at Packages/ANSIescape the .git-admin directory is not located below D:\Packages\.git, but at D:\.git\modules\Packages\ANSIescape instead.
This indicates an error-prone configuration and will most likely result in confusion and strange behavior. You should re-done the submodule from scratch.
此消息打开子模块的速度变慢了很多,
它每秒计数 1,直到它到达我在文件夹中安装的 73 个子模块:
我被要求在关闭按钮上用鼠标点击 73 次,否则这些消息永远不会消失。当我打开存储库时,它们总是会进来。
更新
有这个脚本可以重现相同的存储库结构。你只需要 运行 并在 Smartgit 上打开存储库,它会指出错误:
# Create the directory structure
mkdir main_repo
mkdir main_repo/unrelated_repo
mkdir main_repo/unrelated_repo/main_repo_submodule
cd main_repo
# Setup the unrelated_repo
cd unrelated_repo
printf "# UnRelated Repository\n\n" > README.md
git init
git add -f README.md
git commit -m "Added the unrelated repository first commit."
git remote add origin https://github.com/user/unrelated_repo
# Setup the main_repo_submodule
cd main_repo_submodule
printf "# This is a submodule from the \`main_repo\`, and not from the \`unrelated_repo\`\n" > README.md
git init
git add -f README.md
git commit -m "Added the main repository submodule first commit."
git remote add origin https://github.com/user/main_repo_submodule
# Setup the main_repo
cd ../..
printf "# Main Repo\n\nThis is the main repository which contains submodules\n" > README.md
printf "\nThis is a main_repo_file on the unrelated repository\n\n" > unrelated_repo/main_repo_file.txt
printf "\n*\n**\n\n" > unrelated_repo/.gitignore
git init
git add -f README.md unrelated_repo/main_repo_file.txt unrelated_repo/.gitignore
git submodule add -f -- https://github.com/user/main_repo_submodule "unrelated_repo/main_repo_submodule"
git commit -m "Added the first main repository first commit."
git remote add origin https://github.com/user/main_repo
# Move the submodule to the parent repository
mkdir -p .git/modules
mv unrelated_repo/main_repo_submodule/.git/ .git/modules/main_repo_submodule
printf "gitdir: ../../.git/modules/main_repo_submodule\n" > unrelated_repo/main_repo_submodule/.git
这并没有回答问题,但是这个特定的错误在 syntevo google
s 论坛上得到了解决:
How to remove this error The submodule at 'Packages
every time I open my repository on Smartgit?
Thanks, this was really helpful to reproduce the problem. As the bug was located in very central code, I've fixed this just in the latest 17.1 preview build (11074) which you can get from:
在第一次下载时,您可能无法获得内部版本 11074,但可能会得到一些较旧的版本 11073,然后单击菜单 Help -> Check for new version
,它会更新为具有修复程序的内部版本 11074。
当 SmartGit 在 git 配置中检测到目录的“错误”设置时,就会显示此错误。
要摆脱这种情况,您只需删除设置即可:
打开文件 .git/config
删除设置为“worktree = ...”的行
保存并关闭文件。
现在关闭并重新打开 SmartGit。应该没有错误。
配置正确,
我在文件夹 D:\
上有一个父 git 存储库,
与子模块 Packages/ANSIescape
,
虽然我在文件夹 D:\Packages
.
1/73: The submodule at 'Packages/ANSIescape' has an error-prone admin area configuration.
For the submodule at Packages/ANSIescape the .git-admin directory is not located below D:\Packages\.git, but at D:\.git\modules\Packages\ANSIescape instead.
This indicates an error-prone configuration and will most likely result in confusion and strange behavior. You should re-done the submodule from scratch.
此消息打开子模块的速度变慢了很多, 它每秒计数 1,直到它到达我在文件夹中安装的 73 个子模块:
我被要求在关闭按钮上用鼠标点击 73 次,否则这些消息永远不会消失。当我打开存储库时,它们总是会进来。
更新
有这个脚本可以重现相同的存储库结构。你只需要 运行 并在 Smartgit 上打开存储库,它会指出错误:
# Create the directory structure
mkdir main_repo
mkdir main_repo/unrelated_repo
mkdir main_repo/unrelated_repo/main_repo_submodule
cd main_repo
# Setup the unrelated_repo
cd unrelated_repo
printf "# UnRelated Repository\n\n" > README.md
git init
git add -f README.md
git commit -m "Added the unrelated repository first commit."
git remote add origin https://github.com/user/unrelated_repo
# Setup the main_repo_submodule
cd main_repo_submodule
printf "# This is a submodule from the \`main_repo\`, and not from the \`unrelated_repo\`\n" > README.md
git init
git add -f README.md
git commit -m "Added the main repository submodule first commit."
git remote add origin https://github.com/user/main_repo_submodule
# Setup the main_repo
cd ../..
printf "# Main Repo\n\nThis is the main repository which contains submodules\n" > README.md
printf "\nThis is a main_repo_file on the unrelated repository\n\n" > unrelated_repo/main_repo_file.txt
printf "\n*\n**\n\n" > unrelated_repo/.gitignore
git init
git add -f README.md unrelated_repo/main_repo_file.txt unrelated_repo/.gitignore
git submodule add -f -- https://github.com/user/main_repo_submodule "unrelated_repo/main_repo_submodule"
git commit -m "Added the first main repository first commit."
git remote add origin https://github.com/user/main_repo
# Move the submodule to the parent repository
mkdir -p .git/modules
mv unrelated_repo/main_repo_submodule/.git/ .git/modules/main_repo_submodule
printf "gitdir: ../../.git/modules/main_repo_submodule\n" > unrelated_repo/main_repo_submodule/.git
这并没有回答问题,但是这个特定的错误在 syntevo google
s 论坛上得到了解决:
How to remove this error The submodule at 'Packages
every time I open my repository on Smartgit?
Thanks, this was really helpful to reproduce the problem. As the bug was located in very central code, I've fixed this just in the latest 17.1 preview build (11074) which you can get from:
在第一次下载时,您可能无法获得内部版本 11074,但可能会得到一些较旧的版本 11073,然后单击菜单 Help -> Check for new version
,它会更新为具有修复程序的内部版本 11074。
当 SmartGit 在 git 配置中检测到目录的“错误”设置时,就会显示此错误。
要摆脱这种情况,您只需删除设置即可:
打开文件 .git/config
删除设置为“worktree = ...”的行
保存并关闭文件。
现在关闭并重新打开 SmartGit。应该没有错误。