1

I am trying to update submodules in a repo. I have successfully cloned the repo and used git checkout to successfully switch to the correct branch I need to be on. When I run git submodule update --init -–recursive in that branch I get the following:

error: pathspec '–-recursive' did not match any file(s) known to git.

I have previously followed this process on a Macbook pro and did not get an error, but am currently getting the error on Windows. I have the latest version of Git installed (2.32.0). I first considered that this could be a Github SSH key issue, but I have confirmed that it asks for my SSH passphrase and proceeds with the cloning to my local machine, so probably not security related. The Git documentation states that this submodule update is mostly foolproof, so I'm unsure where to go from here. I've also tried running git submodule foreach git pull origin master before the submodule update and same error. Any assistance is appreciated.

SarahB
  • 21
  • 2

1 Answers1

0

pathspec '–-recursive' means it interprets what should be an option as a filename/filepath instead.

Double-check your '-' (in case they are 'minus' instead of the regular 'hyphen-minus')

Make sure you are using the latest Git for Windows (2.33.0 from today)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250