How to add Git-submodules in your TYPO3 Project?

Did you ever faced situation where your TYPO3 project needs multiple TYPO3 repository? For example, You have main repository of TYPO3 installation and sepearate number of Git-repositories for your custom TYPO3 extensions? In that situation, to well maintain your TYPO3 project, we highly recommend to use Git-submodule concept as below.

Add Git Submodule

Step 1. Clone the main repository.

Step 2. Use the command git submodule add -f and provide the Sub repository and Path folder where you want to clone

Step 3. You can check .gitmodules created at the root of your project

Step 4. Now push the .gitmodules main repository.

// Add submodule
git submodule add -f [email protected]:t3terminal/themes/products/ns_theme_[Your theme].git public/typo3conf/ext/ns_theme_[Your theme]/

Git Submodule Recursive

// Recursive Git submodule update
git submodule update --init --recursive

// Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules
git submodule sync

Post a Comment

×

Got answer to the question you were looking for?