August 3, 2011

Git Workflow With Submodules

This quick and raw post describes the typical workflow of using Git with submodules...





When a submodule is updated within the scope of the same project (and you want the latest submodule changes)
  • git pull (in the root)
  • git submodule update (in the root)
When a submodule is updated in the scope of another project (and you want those changes in another project which references the submodule)
  • git checkout branchname (in the submodule directory)
  • git pull origin branchname (in the submodule directory)
  • git add -A (in the root)
  • git commit (in the root)

No comments:

Post a Comment

Your feedback is appreciated!