的配置是正確的, 我與子模塊Packages/ANSIescape
, 文件夾D:\
, 對父母的Git倉庫,而我也有文件夾D:\Packages
上無關的Git倉庫。如何在Smartgit客戶端上禁用此消息「容易出錯的管理區域配置」?
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.
此消息明顯放緩了很多,打開子模塊, 它保持,直到它得到的73個子模塊我已在文件夾中安裝算1元秒:
我服從用鼠標點擊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