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

git pull with submodule

From
SCSascha Cunz <sascha-ml@babbelbox.org>
Date
Jun 23, 2012, 13:53 UTC
Message-ID
<1564611.U3XyAbWYKV@toshi>

I noticed the following behaviour when pulling a repository that has a submodule.

I have a standalone checkout of my subproject, which I regulary sync it with its upstream and push the result to github. Then I go to my project where the github repository is setup to be a subproject, 'cd' into the subproject and do 'git pull' there. After that, I commit the subproject blob into the superproject.

Now i switch OS and/or workstation and do a 'git pull' ( in root directory of 
superproject ). Git then
	-> fetches new objects of superproject
	-> fetches new objects of subproject
	-> checks out the subproject to the SHA1 currently recorded in
      the subproject blob. (Am i right on this one?)
	-> merges superproject with it's upstream

After that, i have to cd into the subproject and 'git pull' there again, because it just fetched the objects but did no merge nor checkout.

Is this intentional behaviour or am i doing something wrong / have wrong expectations in that "after seeing it recurring into the subproject, i expect i don't need to do further steps in order to have it up to date"?

SaCu
PS I'm using a mix of git Versions 1.7.{6,8,10}
Next: Jens Lehmann
Message 1 of 2 in “git pull with submodule”
  1. Sascha CunzJun 23, 2012
  2. Jens LehmannJun 24, 2012

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.