Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make a git submodule a normal folder?

Tags:

git

I have a project that has a number of submodules and I am trying to make them act as normal folder and not repos. I have deleted the .git/ folder in each of them,but they still act like submodules and when I run a git status they do not seem to show up as untracked files.

like image 858
Trt Trt Avatar asked Jun 30 '26 09:06

Trt Trt


1 Answers

The submodule needs to be removed using git rm (this'll remove the submodule's files from your file system). You can then clone the submodule's repository into your repo (using git clone), remove the .git directory in the "submodule"'s directory, and git add!

like image 200
lungj Avatar answered Jul 01 '26 22:07

lungj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!