When i execute git submodule update --init
I get error
fatal: Needed a single revision Unable to find current revision in submodule path 'plugins/pluginname'.
Actually I was trying to run a Jenkins Job to deploy it. I added Recursively update submodules as additional behavior in Jenkins. FATAL: Command "git.exe submodule update --init --recursive" returned status code -1: This is occurring only from my local as same command is working for others.
If you already cloned the project and forgot --recurse-submodules , you can combine the git submodule init and git submodule update steps by running git submodule update --init . To also initialize, fetch and checkout any nested submodules, you can use the foolproof git submodule update --init --recursive .
git submodule sync synchronizes all submodules while git submodule sync -- A synchronizes submodule "A" only. If --recursive is specified, this command will recurse into the registered submodules, and sync any nested submodules within.
A git submodule is a record within a host git repository that points to a specific commit in another external repository. Submodules are very static and only track specific commits. Submodules do not track git refs or branches and are not automatically updated when the host repository is updated.
Try git submodule foreach git pull
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