Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.44 KB

git-submodules.md

File metadata and controls

34 lines (25 loc) · 1.44 KB

Working with Git Submodules

up

Git submodules are used in this project to manage the various OE layers for reasons described in this document. See this article for an introduction to Git submodules.

There are a few issues that are commonly encountered decsribed below.

Modifying Submodules

Git submodules are not checked out as branch, but simply a git version. The first thing you should do when working on a submodule is check out the appropriate branch, documented in the .gitmodules file. If you forget to do this, you may get an error when pushing and then if you run git branch, you'll discover you are on the (no branch) branch. To recover from this situation, check out the branch you want to work on and then run git reflog. This command will list recent commits which you can then cherry-pick to your working branch. See this article for more information.

Submodule merge conflicts

If you get a submodule merge conflict, run git reset \<sources/submodule\>

Submodule remote changes

If the remote repository for a submodule changes, run git submodule sync to synchronize the new remote information into your working directory. This problem is most often noticed when the git submodule update command cannot find a version.