配置正确,
我在文件夹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
答案 0 :(得分:2)
这不回答这个问题,但是这个特定的错误在syntevo google
s论坛上得到了解决:
How to remove this error The submodule at 'Packages
every time I open my repository on Smartgit?
谢谢,这对重现问题非常有帮助。由于错误位于非常中心的代码中,我已经在最新的17.1预览版本(11074)中解决了这个问题,您可以从中获取:
在第一次下载时,您可能无法获得构建11074,但有些较旧版本为11073,然后单击菜单Help -> Check for new version
并更新为使用修复程序构建11074。
答案 1 :(得分:1)
当SmartGit在git配置中检测到目录的“错误”设置时,就会显示此错误。
要摆脱这一点,您只需删除设置:
打开文件.git / config
删除设置为“ worktree = ...”的行
保存并关闭文件。
现在关闭并重新打开SmartGit。应该没有错误。