SlideShare uma empresa Scribd logo
1 de 13
Baixar para ler offline
git submodule

         Olaf Alders
 olaf@wundercounter.com
twitter.com/wundercounter
   Toronto Perl Mongers
       Sept 29, 2011
What does it do?

Git's submodule support allows a repository to contain, as a subdirectory, a checkout of an external project.
Submodules maintain their own identity; the submodule support just stores the submodule repository location and
commit ID, so other developers who clone the containing project ("superproject") can easily clone all the
submodules at the same revision. Partial checkouts of the superproject are possible: you can tell Git to clone none,
some or all of the submodules.

source: "Git Community Book"
http://book.git-scm.com/5_submodules.html
An Example:

mkdir shiny_app
cd shiny_app/
git init
mkdir inc
mkdir -p root/static/js
mkdir -p root/static/css
echo "shiny app" > README
git add .
git commit -a -m "initial commit"
Add a submodule

git submodule add https://github.com/twitter/bootstrap.git inc/bootstrap

git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: .gitmodules
# new file: inc/bootstrap

cat .gitmodules
[submodule "inc/bootstrap"]
path = inc/bootstrap
url = https://github.com/twitter/bootstrap.git

git commit -a -m "adds bootstrap as submodule"
Link it up!

mkdir root/static/css
mkdir root/static/js
ln -s inc/bootstrap/bootstrap.min.css root/static/css/
ln -s inc/bootstrap/js root/static/js/bootstrap

git commit root -m "adds bootstrap symlinks"
Now what?

  ● Work as you normally would
  ● Later, when you want to update bootstrap to the latest version

cd inc/bootstrap
git pull origin master
cd ../..
git commit inc/bootstrap -m "updates bootstrap"
Cloning repos with submodules

When someone else clones your repo, they need to update and init:

$ cd ..
git clone shiny_app bootstrapper
Cloning into bootstrapper...
done.

$ cd bootstrapper/
$ ls
README inc root
olaf-alderss-macbook-pro:bootstrapper olaf

$ ls inc/bootstrap/

# no output above -- the inc/bootstrap folder is empty
Remember to init and update

We've got the repo, but the submodule is empty. Two commands will fix that.

$ git submodule init
Submodule 'inc/bootstrap' (https://github.com/twitter/bootstrap.git) registered
for path 'inc/bootstrap'

$ git submodule update
Cloning into inc/bootstrap...
remote: Counting objects: 3845, done.
remote: Compressing objects: 100% (1430/1430), done.
remote: Total 3845 (delta 2474), reused 3663 (delta 2329)
Receiving objects: 100% (3845/3845), 1.04 MiB | 388 KiB/s, done.
Resolving deltas: 100% (2474/2474), done.
Submodule path 'inc/bootstrap': checked out
'28c770bf679e131cc030c3bc4a1981450f831908'
Is your HEAD detached?

By default, the submodule in the cloned repo will not be on a
branch:

cd inc/bootstrap/
git branch
* (no branch)
  master

Try to remember to work on a branch before committing:

$ git checkout master
Oops!

If you commit while not on a branch, you'll get the following "detached HEAD"
message:

$ git commit README.md -m "random change"
[detached HEAD b92b798] random change
 1 files changed, 3 insertions(+), 0 deletions(-)

This is easy to recover from. Just check out a branch and merge the commit:

$ git checkout master
$ git merge b92b798
git pull != git submodule update

Team members should remember to change their workflow to:

git pull origin master
git submodule update

Remember, a pull does not fetch submodule updates. To stay
totally in sync, team members will want to update submodules
as they pull.
Caveat

Merge conflicts
If two team members commit the same submodule with
differing HEADs, you will get a merge conflict. You will need to
resolve this manually.
What do you gain from submodules?

 ● You can build and test against bleeding edge checkouts
 ● You don't have to add someone else's code to your repo
 ● Team members can build against exactly the checkout you've built and
   tested against and vice versa
 ● Updating your submodules is trivial

Mais conteúdo relacionado

Mais procurados

Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 

Mais procurados (20)

Docker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshopDocker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshop
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
Jenkins 101: Getting Started
Jenkins 101: Getting StartedJenkins 101: Getting Started
Jenkins 101: Getting Started
 
Git basic
Git basicGit basic
Git basic
 
Git Init (Introduction to Git)
Git Init (Introduction to Git)Git Init (Introduction to Git)
Git Init (Introduction to Git)
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
Git basics
Git basicsGit basics
Git basics
 
Gitlab CI/CD
Gitlab CI/CDGitlab CI/CD
Gitlab CI/CD
 
Branching and Merging Practices
Branching and Merging Practices Branching and Merging Practices
Branching and Merging Practices
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
GIT presentation
GIT presentationGIT presentation
GIT presentation
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Docker and Devops
Docker and DevopsDocker and Devops
Docker and Devops
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
 
Git Pull Requests
Git Pull RequestsGit Pull Requests
Git Pull Requests
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 

Destaque

Mobile App Test Strategy
Mobile App Test StrategyMobile App Test Strategy
Mobile App Test Strategy
kraqa
 
Grafico diario del dax perfomance index para el 10 04-2013
Grafico diario del dax perfomance index para el 10 04-2013Grafico diario del dax perfomance index para el 10 04-2013
Grafico diario del dax perfomance index para el 10 04-2013
Experiencia Trading
 
Grafico diario del dax perfomance index para el 12 02-2013
Grafico diario del dax perfomance index para el 12 02-2013Grafico diario del dax perfomance index para el 12 02-2013
Grafico diario del dax perfomance index para el 12 02-2013
Experiencia Trading
 
Chan presentation final
Chan presentation finalChan presentation final
Chan presentation final
Daniel Chan
 
Wang - A practical model for curricular integration of information literacy i...
Wang - A practical model for curricular integration of information literacy i...Wang - A practical model for curricular integration of information literacy i...
Wang - A practical model for curricular integration of information literacy i...
IL Group (CILIP Information Literacy Group)
 

Destaque (19)

Recycling
RecyclingRecycling
Recycling
 
Git Submodules
Git SubmodulesGit Submodules
Git Submodules
 
Advanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesAdvanced Git: Functionality and Features
Advanced Git: Functionality and Features
 
10th php indonesia surabaya meetup
10th php indonesia surabaya meetup10th php indonesia surabaya meetup
10th php indonesia surabaya meetup
 
Working with multiple git repositories
Working with multiple git repositoriesWorking with multiple git repositories
Working with multiple git repositories
 
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAdvanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
 
Mobile App Test Strategy
Mobile App Test StrategyMobile App Test Strategy
Mobile App Test Strategy
 
Fetch apiについて
Fetch apiについてFetch apiについて
Fetch apiについて
 
Grafico diario del dax perfomance index para el 10 04-2013
Grafico diario del dax perfomance index para el 10 04-2013Grafico diario del dax perfomance index para el 10 04-2013
Grafico diario del dax perfomance index para el 10 04-2013
 
Grafico diario del dax perfomance index para el 12 02-2013
Grafico diario del dax perfomance index para el 12 02-2013Grafico diario del dax perfomance index para el 12 02-2013
Grafico diario del dax perfomance index para el 12 02-2013
 
Prueba de portada
Prueba de portadaPrueba de portada
Prueba de portada
 
Universidad nacional de chimborazo
Universidad nacional de chimborazoUniversidad nacional de chimborazo
Universidad nacional de chimborazo
 
Quiz families march 2105 quiz
Quiz families march 2105 quizQuiz families march 2105 quiz
Quiz families march 2105 quiz
 
How to build brands and influence people
How to build brands and influence peopleHow to build brands and influence people
How to build brands and influence people
 
Chan presentation final
Chan presentation finalChan presentation final
Chan presentation final
 
コイルのスパイスモデル
コイルのスパイスモデルコイルのスパイスモデル
コイルのスパイスモデル
 
Wang - A practical model for curricular integration of information literacy i...
Wang - A practical model for curricular integration of information literacy i...Wang - A practical model for curricular integration of information literacy i...
Wang - A practical model for curricular integration of information literacy i...
 
Figuras literarias
Figuras literariasFiguras literarias
Figuras literarias
 
"Using Blockchain Technology to Maintain OERs and IPs" by Sherry Jones (April...
"Using Blockchain Technology to Maintain OERs and IPs" by Sherry Jones (April..."Using Blockchain Technology to Maintain OERs and IPs" by Sherry Jones (April...
"Using Blockchain Technology to Maintain OERs and IPs" by Sherry Jones (April...
 

Semelhante a Git submodule

Using Git as your VCS with Bioconductor
Using Git as your VCS with BioconductorUsing Git as your VCS with Bioconductor
Using Git as your VCS with Bioconductor
timyates
 

Semelhante a Git submodule (20)

Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)
 
Transformative Git Practices
Transformative Git PracticesTransformative Git Practices
Transformative Git Practices
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Using Git as your VCS with Bioconductor
Using Git as your VCS with BioconductorUsing Git as your VCS with Bioconductor
Using Git as your VCS with Bioconductor
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Jedi Mind Tricks for Git
Jedi Mind Tricks for GitJedi Mind Tricks for Git
Jedi Mind Tricks for Git
 
Practical git for developers
Practical git for developersPractical git for developers
Practical git for developers
 
Getting Into Git
Getting Into GitGetting Into Git
Getting Into Git
 
How to use git without rage
How to use git without rageHow to use git without rage
How to use git without rage
 
Git, from the beginning
Git, from the beginningGit, from the beginning
Git, from the beginning
 
Jedi Mind Tricks in Git
Jedi Mind Tricks in GitJedi Mind Tricks in Git
Jedi Mind Tricks in Git
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Git single branch
Git single branchGit single branch
Git single branch
 
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -EssentialsJAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
 
GitLab on OpenShift
GitLab on OpenShiftGitLab on OpenShift
GitLab on OpenShift
 
Getting Started with Git
Getting Started with GitGetting Started with Git
Getting Started with Git
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
 
Git the Docs: Learning Git in a safe space
Git the Docs: Learning Git in a safe spaceGit the Docs: Learning Git in a safe space
Git the Docs: Learning Git in a safe space
 

Mais de Olaf Alders (6)

No Hugging, No Learning
No Hugging, No LearningNo Hugging, No Learning
No Hugging, No Learning
 
The MetaCPAN VM Part II (Using the VM)
The MetaCPAN VM Part II (Using the VM)The MetaCPAN VM Part II (Using the VM)
The MetaCPAN VM Part II (Using the VM)
 
The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)
 
Ab(Using) the MetaCPAN API for Fun and Profit v2013
Ab(Using) the MetaCPAN API for Fun and Profit v2013Ab(Using) the MetaCPAN API for Fun and Profit v2013
Ab(Using) the MetaCPAN API for Fun and Profit v2013
 
(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit
 
Mangling
Mangling Mangling
Mangling
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Git submodule

  • 1. git submodule Olaf Alders olaf@wundercounter.com twitter.com/wundercounter Toronto Perl Mongers Sept 29, 2011
  • 2. What does it do? Git's submodule support allows a repository to contain, as a subdirectory, a checkout of an external project. Submodules maintain their own identity; the submodule support just stores the submodule repository location and commit ID, so other developers who clone the containing project ("superproject") can easily clone all the submodules at the same revision. Partial checkouts of the superproject are possible: you can tell Git to clone none, some or all of the submodules. source: "Git Community Book" http://book.git-scm.com/5_submodules.html
  • 3. An Example: mkdir shiny_app cd shiny_app/ git init mkdir inc mkdir -p root/static/js mkdir -p root/static/css echo "shiny app" > README git add . git commit -a -m "initial commit"
  • 4. Add a submodule git submodule add https://github.com/twitter/bootstrap.git inc/bootstrap git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: .gitmodules # new file: inc/bootstrap cat .gitmodules [submodule "inc/bootstrap"] path = inc/bootstrap url = https://github.com/twitter/bootstrap.git git commit -a -m "adds bootstrap as submodule"
  • 5. Link it up! mkdir root/static/css mkdir root/static/js ln -s inc/bootstrap/bootstrap.min.css root/static/css/ ln -s inc/bootstrap/js root/static/js/bootstrap git commit root -m "adds bootstrap symlinks"
  • 6. Now what? ● Work as you normally would ● Later, when you want to update bootstrap to the latest version cd inc/bootstrap git pull origin master cd ../.. git commit inc/bootstrap -m "updates bootstrap"
  • 7. Cloning repos with submodules When someone else clones your repo, they need to update and init: $ cd .. git clone shiny_app bootstrapper Cloning into bootstrapper... done. $ cd bootstrapper/ $ ls README inc root olaf-alderss-macbook-pro:bootstrapper olaf $ ls inc/bootstrap/ # no output above -- the inc/bootstrap folder is empty
  • 8. Remember to init and update We've got the repo, but the submodule is empty. Two commands will fix that. $ git submodule init Submodule 'inc/bootstrap' (https://github.com/twitter/bootstrap.git) registered for path 'inc/bootstrap' $ git submodule update Cloning into inc/bootstrap... remote: Counting objects: 3845, done. remote: Compressing objects: 100% (1430/1430), done. remote: Total 3845 (delta 2474), reused 3663 (delta 2329) Receiving objects: 100% (3845/3845), 1.04 MiB | 388 KiB/s, done. Resolving deltas: 100% (2474/2474), done. Submodule path 'inc/bootstrap': checked out '28c770bf679e131cc030c3bc4a1981450f831908'
  • 9. Is your HEAD detached? By default, the submodule in the cloned repo will not be on a branch: cd inc/bootstrap/ git branch * (no branch) master Try to remember to work on a branch before committing: $ git checkout master
  • 10. Oops! If you commit while not on a branch, you'll get the following "detached HEAD" message: $ git commit README.md -m "random change" [detached HEAD b92b798] random change 1 files changed, 3 insertions(+), 0 deletions(-) This is easy to recover from. Just check out a branch and merge the commit: $ git checkout master $ git merge b92b798
  • 11. git pull != git submodule update Team members should remember to change their workflow to: git pull origin master git submodule update Remember, a pull does not fetch submodule updates. To stay totally in sync, team members will want to update submodules as they pull.
  • 12. Caveat Merge conflicts If two team members commit the same submodule with differing HEADs, you will get a merge conflict. You will need to resolve this manually.
  • 13. What do you gain from submodules? ● You can build and test against bleeding edge checkouts ● You don't have to add someone else's code to your repo ● Team members can build against exactly the checkout you've built and tested against and vice versa ● Updating your submodules is trivial