I have a simple project that has one submodule.
$ git submodule
964737623a362f6303e87ec41f2c7090c8c2c093 lib/mongodb-php-odm (heads/master-1-g9647376)
I have made changes to that submodule and committed them, but cannot push them to github.
$ cd lib/mongodb-php-odm
$ git branch
* (no branch)
master
$ git remote -v
origin [email protected]:colinmollenhour/mongodb-php-odm.git
$ git ls-remote .
964737623a362f6303e87ec41f2c7090c8c2c093 HEAD
6f5f91eff9b1854faa30608f335aee92aa7532eb refs/heads/master
6f5f91eff9b1854faa30608f335aee92aa7532eb refs/remotes/origin/HEAD
6f5f91eff9b1854faa30608f335aee92aa7532eb refs/remotes/origin/master
$ git push origin master
Everything up-to-date
I don't understand why it says "Everything up-to-date" because the 964737 commit has not been pushed to github. It is likely I did something wrong, but I have no idea what that would be..
How do I push the latest commit in this submodule to github?
It seems that you committed to no branch, i.e. your commit isn't part of any branch. Create a branch where you're standing, then launch gitk to compare to master, then cherry-pick or rebase as necessary.