submodules git visual studio "fatal: unexpected sequence in commit output" can they just checkin?
Asked Answered
N

5

18

Any reason why git submodules in Visual Studio 2017 just don't want to checkin? I keep getting

fatal: unexpected sequence in commit output

Seems like sometimes they DO checkin, but most of the time they don't. Am I misunderstanding something?

enter image description here

Nomarchy answered 26/4, 2018 at 22:30 Comment(1)
I recommend using the standard git terminology. Eg use commit not checkin.Magog
R
12

In my case the problem was that not all the files had been saved when trying to commit.

This showed me where to look.

"I got this exception when the file with changes I was attempting to commit was not saved"

Reverential answered 15/11, 2018 at 8:53 Comment(0)
F
8

With assistance from the main answer. The submodule change was the only change that required committing, and attempting to commit produced the error.

Making an additional minor change in a any project file, such as removing an empty line, following by a 'Commit All' on the 2 changes, solved the problem.

Finny answered 31/10, 2019 at 14:6 Comment(0)
D
2

I was facing the same problem and the reason was that submodule was opened in VS code and I made some changes in VS code editor which was uncommitted. committing those changes in VS code solved my problem.

In my case, submodule was an Angular 8 project that I was integrating in a solution with many existing projects.

Dreeda answered 22/11, 2019 at 9:55 Comment(0)
J
0

I was getting this exact error because the sub-module was in the repo but no longer referenced in the solution but it did reference a project that was still in the solution.

Here's what I did.

I could not find the submodule referenced in the changes list.

I used Git Bash to attempt to remove the offending submodule using this https://gist.github.com/gitaarik/8735255#gistcomment-2116278

The response : rm: cannot remove 'EventStream.Management': Is a directory

Realised that I have an old project that is removed from the solution (so I was not seeing it), but not removed from the repo because it still existed in the solution folder. That de-referenced project did reference a project that is still in the solution that has since been updated. I believe this was causing the unexpected sequence error.

I removed the folder containing the de-referenced project and I rebuilt the repo (I wanted to start a new master anyway). Problem fixed.

Jeanett answered 3/3, 2019 at 8:54 Comment(0)
A
0

For me the issue was a bad commit I did before the current commit which affected the current one. I reverted the old one, fixed some file changes issues and then the commit succeeded

Altaf answered 7/5, 2020 at 12:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.