After submitting subprojects submodule code can not push to a remote repository

phenomenon

After submitting the following code hints:

image description

the reason

In the project clone when submodule to the local head of sub clone default points to the commit latest submission is a free state.

Solutions

1. uncommitted Code

After the sub-clone the master branch module checkout submit the code:

git submodule foreach git checkout master

2. The Code has been submitted in a free state of:

step1  : first current free state with the name of a new branch

git checkout -b new

step2  : switch to master and then merge the new branch has just submitted

git checkout master

git merge new

step3 : You can delete the useless new branch

git branch -d new

Guess you like

Origin www.cnblogs.com/killall007/p/11275578.html