visitor1
visitor1

Reputation: 33

How to know if a git submodule commit is already pushed into the repository

Suppose you have a repository called super and a submodule called sub. Stand in super, I'd like to know if sub last commit is already pushed to the repository or if it's local.

Upvotes: 1

Views: 625

Answers (1)

karmakaze
karmakaze

Reputation: 36134

At super> "git status" will show you "modified: submodule/sub (new commits)" if the local sub is at a different commit point than the local super's committed submodule.

At sub> "git log origin/master..master" will show you commits from the pushed 'master' branch and local 'master' branch, if any.

Does this answer your question? If not, please clarify.

Upvotes: 2

Related Questions