Advanced iOS : Git Submodule in iOS (A Parallel Software Development Approach)

Опубликовано: 05 Август 2026
на канале: iOSCoderAbhimanyuDaspan
2,384
37

Git Submodule Guide

1. Clone your Main Application in your local Machine :-

git clone https://app1.git

2. Clone your framework or library which you want to attach to your main project as submodule in your local Machine:-

git clone https://framework.git

3. Add Core Framework as Submodule in your main app :

git submodule add https://framework.git

4. Check git status :-

git status

one .gitmodules file will generate with submodules information at app directory path

5. Push the main app with submodule :

git add .

git commit -m “ Main App now loaded with Submodule Framework ! ”

git push

6. When take fresh clone of main App with submodules do like this :-

One way to clone :-

git clone https://[email protected]/asrathore1527/app1.git

git submodule init

git submodule update

Another direct way to clone in single command (it will automatically take all submodule and their updates as well):-

git submodule update --init --recursive

Direct clone with multiple submodules (also nested submodule with their updates):-

git clone --recurse-submodules https://[email protected]/asrathore1527/app1.git

7. For getting update of submodule in between :-

For Multiple submodules update :

git submodule update --init --recursive --remote

For Single Submodule update

git submodule update --init --remote -- reusableframework


8. Removing or deinit Submodule from repository :-

git submodule deinit path_to_submodule

git rm path_to_submodule

git commit-m "Removed submodule "



rm -rf .git/modules/path_to_submodule git push


Thanks!



Go Slow, Speed will come automatically!!

Mail Me:
[email protected]

Twitter
  / daspanabhimanyu  

Facebook
  / abhimanyu.daspan.7  

Instagram
  / ioscoderabhimanyudaspan  

Youtube
   / @ioscoderabhimanyudaspan8269  

Github:-
https://github.com/AbhimanyuForiOS

LinkedIn
  / abhimanyu-singh-rathore-daspan-🇮🇳-77677098  

#ios​
#git​
#xcode​