949 B
949 B
Add new repo: git submodule add https://git2.tavasi.ir/front/chat_ui.git systems/chat_ui -f
Cloning a Repository with Submodules If you clone a repository that contains submodules, you'll need to initialize and update the submodules: git clone cd git submodule init git submodule update
Or, you can do it in one step: git clone --recurse-submodules
Updating Submodules To update a submodule to the latest commit on its branch: git submodule update --remote
Removing a Submodule Removing a submodule is a bit more involved:
Remove the submodule entry from .gitmodules.
Stage the .gitmodules changes: git add .gitmodules.
Remove the submodule from the working tree and index: git rm --cached <path-to-submodule>.
Delete the submodule directory: rm -rf <path-to-submodule>.
Commit the changes: git commit -m "Removed submodule <submodule-name>".