submodules git visual studio “fatal: unexpected sequence in commit output” can they just checkin?

跟風遠走 提交于 2021-02-07 11:21:46

问题


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?


回答1:


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"




回答2:


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.




回答3:


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.




回答4:


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.




回答5:


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



来源:https://stackoverflow.com/questions/50052743/submodules-git-visual-studio-fatal-unexpected-sequence-in-commit-output-can-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!