How to update a submodule in git to the HEAD commit in that external repo

Posted by cmyers on Stack Overflow See other posts from Stack Overflow or by cmyers
Published on 2010-02-16T23:56:52Z Indexed on 2010/03/29 4:03 UTC
Read the original article Hit count: 275

I had problems finding the answer to this so I am posting it for posterity.

The situation is, you have a git repo with a submodule (similar to an svn external). You want to update that reference to point to a different commit in the external repository. You might think 'git submodule sync' or 'git submodule update' would do that - you'd be wrong.

© Stack Overflow or respective owner

Related posts about version-control

Related posts about git