Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git submodule update gives "error: invalid key (newline)"

After a painful merge, when I run git submodule update, I get this:

>git submodule update

error: invalid key (newline): submodule.external/mono-reactive
external/mono-reactive.url
error: invalid key (newline): submodule.external/mono-reactive
external/mono-reactive.update

What's the matter?

like image 938
Dan Abramov Avatar asked Nov 28 '12 14:11

Dan Abramov


People also ask

Will git pull update submodules?

Pulling with submodules. Once you have set up the submodules you can update the repository with fetch/pull like you would normally do. To pull everything including the submodules, use the --recurse-submodules and the --remote parameter in the git pull command .

How do you update a submodule in a project?

In order to update an existing Git submodule, you need to execute the “git submodule update” with the “–remote” and the “–merge” option. Using the “–remote” command, you will be able to update your existing Git submodules without having to run “git pull” commands in each submodule of your project.

What does git submodule update -- Remote do?

For example, submodule update --remote --merge will merge upstream submodule changes into the submodules, while submodule update --merge will merge superproject gitlink changes into the submodules.


1 Answers

Turns out, I had a particular submodule defined twice in .gitmodules.
Once I removed the extra entry, the error would be gone!

like image 188
Dan Abramov Avatar answered Oct 11 '22 13:10

Dan Abramov