How do I correctly move a git submodule?

How do you interpret the output of git submodule status?

  • The output seems to be a single character that is usually either a space or - or + or U then followed by a 40 character hash.  What does the prefix character mean in each case?  And what does the hash represent?

  • Answer:

    From http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html status Show the status of the submodules. This will print the SHA-1 of the currently checked out commit for each submodule, along with the submodule path and the output of git describe for the SHA-1. Each SHA-1 will be prefixed with - if the submodule is not initialized, + if the currently checked out submodule commit does not match the SHA-1 found in the index of the containing repository and U if the submodule has merge conflicts.

Shreyes Seshasai at Quora Visit the source

Was this solution helpful to you?

Other answers

The above reply is useless, it's a direct quote from the man page.  I think it'd be more useful to explain why the SHA-1 might not match that found in the index of the containing repository, etc.

Ryan Foster

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.