Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 6
    I worked with changing the last line to: git submodule foreach git pull --ff-only origin master Commented Oct 23, 2014 at 7:43
  • 2
    I also would add --recursive to the last line: "git submodule foreach --recursive git merge origin master" otherwise you can get a dirty submodule when it itself has updated a submodule. Commented Oct 2, 2015 at 18:54
  • Been looking for this for the past three hours. Thank you sir. To add to this, you can also use these commands for committing, such as: git submodule foreach --recursive 'git commit -a | :'. The : makes it loop regardless of result. See linkstackoverflow.com/questions/19728933/…. Commented May 23, 2017 at 2:10