git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git submodule problem
@ 2021-03-30  9:09 Erik Claij
  0 siblings, 0 replies; only message in thread
From: Erik Claij @ 2021-03-30  9:09 UTC (permalink / raw)
  To: git

Dear git,

Changing branch with

     git checkout --recurse-submodules <branch>

does not work when the branch does contain a new submodule.

Cloning a repo without submodules in master but submodules in the 
<branch> will reproduce this problem.

Error

     fatal: not a git repository: 
../../.git/modules/module/esp32_peripherals
     fatal: could not reset submodule index

The alternative way does work

     git checkout <branch>
     git submodule update --init --recurse
     git clean -ffd

Best,

Erik Claij


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-30  9:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  9:09 git submodule problem Erik Claij

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).