Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git remove submodule

# Remove the submodule entry from .git/config
git submodule deinit -f path/to/submodule

# Remove the submodule directory from the superproject's .git/modules directory
rm -rf .git/modules/path/to/submodule

# Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule
git rm -f path/to/submodule
Comment

remove submodule git

To remove a submodule you need to:

Delete the relevant section from the .gitmodules file.
Stage the .gitmodules changes git add .gitmodules
Delete the relevant section from .git/config.
Run git rm --cached path_to_submodule (no trailing slash).
Run rm -rf .git/modules/path_to_submodule (no trailing slash).
Commit git commit -m "Removed submodule "
Delete the now untracked submodule files rm -rf path_to_submodule
Comment

git submodule remove

# Remove the submodule entry from .git/config
git submodule deinit -f path/to/submodule

# Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule
git rm -f path/to/submodule

# Remove the submodule directory from the superproject's .git/modules directory
rm -rf .git/modules/path/to/submodule

#Remember to commit the remove change!
git commit -m "removed submodule"
Comment

git remove submodules

git submodule foreach -q git config -l
Comment

git remove submodule

Option 1.
Remove .gitmodules file from project

Option 2.
rm -rf .git/modules/path_to_submodule

Remember to commit the remove change!
Comment

PREVIOUS NEXT
Code Example
Shell :: make shortcut folder in htdocs 
Shell :: git clone in 
Shell :: bash remove first character from string 
Shell :: git ls files sort by date 
Shell :: add user to dockerfile 
Shell :: how to install docker in ubuntu using terminal 
Shell :: vim remove line by pattern from all files 
Shell :: git push to existing repo 
Shell :: git-hub push code 
Shell :: pyinstaller module not found 
Shell :: Install Zenkit on Linux 
Shell :: npm morgan install 
Shell :: conda install pytorch 
Shell :: add user to debian 11 
Shell :: ufw deny from ip 
Shell :: linux cpu power install 
Shell :: use latex in github readme 
Shell :: how to download youtube videos in ubuntu 20.04 
Shell :: how to git pull origin master 
Shell :: how to login github in terminal 
Shell :: run production environment nodejs 
Shell :: download subfolder from github 
Shell :: tail command in linux 
Shell :: .local ubuntu 
Shell :: no sound on ubuntu 
Shell :: portainer install 
Shell :: how to install pycord 
Shell :: run speedtest command line mac 
Shell :: generate crt and key openssl 
Shell :: how to install SunraPhpSimpleHtmlDomParser composer 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =