From: Mike Hommey Date: Fri, 01 May 2020 00:54:32 GMT Subject: git checkout --recurse-submodules doesn't like checking out an older commit after a submodule was removed Message-ID: <20200501005432.h62dnpkx7feb7rto@glandium.org> Hi, Doing the following fails: $ git clone --recurse-submodules https://github.com/trailofbits/winchecksec/ $ cd winchecksec $ git checkout --recurse-submodules 93ffe67dbfc757bf6f440d80b8acf88e652ed60a fatal: not a git repository: ../.git/modules/pe-parse fatal: could not reset submodule index The main reason is that the pe-parse directory/submodule was removed in the commit that follows 93ffe67dbfc757bf6f440d80b8acf88e652ed60a (which is current master). This also leaves the tree in a bad state, and it's hard to fix anything from that state. Mike