Visual Studio: pushed solution for Team Services, but won't push submodule

I was having trouble connecting my command to my code because the submodule was not pushed during the initial commit. It shows up as the only change that needs to be committed, but when I try to commit it, I get an error that says "fatal: unexpected sequence in commit output". I have searched everywhere and it seems that I am the only one having this problem. Of course, my team cannot pull my code because it doesn't contain a submodule. Has anyone else experienced this before?

+4


source to share


3 answers


I faced similar issue while trying to commit using visual studio. The problem was that some of the modified files were not saved. I clicked "SaveAll" and tried again. This time it worked



+5


source


To add a submodule for the git repo and push to the remote , you must use the following commands:

git submodule add <sub repo URL>
git commit 
git push

      

The submodule will then be successfully pushed to the remote repo.

To push changes out of the remote (including submodules) for other developers:



git pull
git submodule update --recursive

      

To clone a remote repo using submodules :

git clone <URL> --recursive

      

Or select Recursively clone submodules to use VS to clone the repo. enter image description here

0


source


I ran into the error "Fatal: Unexpected sequence in commit output" in the project. I found hidden .vs and .git folders in the current project folder. (Not solution folder)

When I remove them, the unexpected sequence in the project commit error disappears and push works successfully

0


source







All Articles