git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Submodules and branches

From
PMPat Maddox <pergesu@gmail.com>
Date
Apr 4, 2008, 19:40 UTC
Message-ID
<810a540e0804041240p4efd0973g7f46a2021b352822@mail.gmail.com>

I've got a repository that uses submodules. If I cd to the repo root and create a branch, all the submodules are switched to that branch as well. All good so far. I go into the submodules and do my work, committing as I go along. Then when I'm all done and want to merge the changes into my master branch, I cd back to the repo root and do "git merge new_topic"

That's where it breaks down. The commits that I made go into the master repo itself, and the submodules don't have them. So when I push from the submodule to its origin, nothing goes through. The code is now a part of the master repo.

Is it possible for me to use branches like usual, but with submodules?
Pat
Next: Avery Pennarun
Message 1 of 3 in “Submodules and branches”
  1. Pat MaddoxApr 4, 2008
  2. Avery PennarunApr 4, 2008
  3. Pat MaddoxApr 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.