- The ‘url’ gives the repository URL link for the respective submodules using which Git clones the project.
- The two sample submodules are ‘SampleModule1’ with URL and ‘SampleModule2’ with URL start by initializing a Git repository for SampleProject, to do this we use the command in the terminal:
2)We’ll create a SampleFile for initial commit using any text editor and commit the file using the command:
- We have the details for the submodule above, using that we’ll integrate those repositories into our project as one of the subdirectories:
git submodule add git submodule add 3.
- a)Now both the submodules are added to your project, if we check the repository tracking status in SampleProject directory using ‘git status’, we’ll get the following output:
Here three files are created ‘.
“Commands Quoted From try removing the SubModule1Local from our project:
git submodule deinit SubModule1Local
My project folder now looks like,
-Working in Submodule: You can directly work in the repository of the submodule by changing the current working directory to the subdirectory of the submodule.
Working with Git is great. The modern version control system that boosts a distributed architecture has much to offer when compared to many of
Continue reading “Working with Git Submodules”