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?
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 .
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.
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.
Turns out, I had a particular submodule defined twice in .gitmodules
.
Once I removed the extra entry, the error would be gone!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With