Skip to main content

Adding Git Submodule

  1. Add Submodule

    Untitled

    On Source Tree, Right Click near Remotes, Add Submodules

    Using Git Bash:

    git submodule add -b <BranchName>[https://gategit.agate.id/newace/modulexyz.git](https://gategit.agate.id/newace/modulexyz.git) <SubModulePath>
    
  2. Now, you have staging area like this

    Untitled

    1. .gitsubmodules contains path, url, and branch
    2. contains commit reference
  3. Commit, then you have Submodules like this.

    Untitled

  4. If you are in Unity, you can add package in Package Manager (Window→ Package Manager)

    Untitled

  5. If you want to know git submodule capabilities, use git bash and do command

    git submodule --help