git submodule
git clone <repository> <path>
# enter the repo folder.
cd <path>
# update submodules in project
git submodule update --init
# Deinit all submodules so there will leave nothing about submodules
# after switch the branch.
git submodule deinit .
# Switch to your target branch.
git checkout <branch>
# Pull all submodules.
git submodule update --init
# Keyword *foreach means that all submodules in this project will do something.
git submodule foreach 'case $name in <path>) ;; *) git status ;; esac'
# There might occur errors, such as the working space is dirty or something else,
# you need to resolve,
# but it's still a convenient command for a bulk modification.
git submodule foreach 'git add .; git commit -m <msg>; git push'
git config --file=.gitmodules -l
git submodule add -b <branch> -- <repository> [<path>]
# Git will syna automatically after change the settings via git submodule.
git submodule set-url -- <path> <repository>
# Instead of command, you can modify .gitmodules file directly.
# After the modification you need to execute the command below to sync settings.
git submodule sync
git submodule set-branch -b <branch> -- <path>
# Remove the submodule entry from .git/config
git submodule deinit -f -- <path>
# Remove the submodule directory from the superproject's .git/modules directory
rm -rf .git/modules/<path>
# in powershell: rm -Recurse -Force .git/modules/<path>
# Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule
git rm -f <path>
# deinit all submodules from .gitmodules
git submodule deinit -f .
# remove all submodules (`git rm`) from .gitmodules
git submodule | cut -c43- | while read -r line; do (git rm "$line"); done
# delete all submodule sections from .git/config (`git config --local --remove-section`) by fetching those from .git/config
git config --local -l | grep submodule | sed -e 's/^\(submodule\.[^.]*\)\(.*\)/\1/g' | while read -r line; do (git config --local --remove-section "$line"); done
# manually remove leftovers
rm .gitmodules
rm -rf .git/modules
Git
Submodule
pixi彈性化較大, 較能適應系統面彈性需求(直橫版, 風格換皮之類)cocos 暫無概念, 保守看待(可能需要拆分多專案處理)
Apr 25, 2024一律標上,但即便是 public(default)也要標上
Feb 20, 2024人資系統 NuEIP 點我前往 <font color = #FF0000>上下班打卡</font>、行政通知、公司組織圖等等 通訊軟體 Mattermost 官網下載 公司通訊軟體 開發軟體 TortoiseSVN 官網下載
Nov 8, 2023快速檢查 circular dependency 透過 madge 套件 列出文字版內容只列出透過相對路徑 import 的 module (src 可替換成其他路徑或指定檔案)npx madge src --extensions ts 只列出循環依賴的項目--circular 讀取 tsconfig (可解析 alias)--ts-config ./tsconfig.json 將循環依賴關係圖像化(輸出 svg 或 dot)
Mar 21, 2023or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up