O
O
Outsider V.2019-01-09 18:35:09
git
Outsider V., 2019-01-09 18:35:09

How to add an existing local folder as a Git submodule?

I read about git submodules, but I don't see how to do what I need. I have initialized the general local turnip of the site (Magento), in the subdirectory of the site I want to create a Magento module, for which there will be a separate turnip, while also local. What I see in the instructions is to add repositories from external sources:

git submodule add git://github.com/chneukirchen/rack.git rack

I just need to create a local submodule, to which I can then add an external origin, and the change history of which will be separate from the general change history of the site.
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-01-09
@Zarom

Try this
git submodule add file://path/to/chneukirchen/rack rack

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question