How to split a git repository into two different ones
These are the steps to extract a directory from a git repository (with all its history commit), create a new repository from this directory, and optionally remove it from the original one.
To the ones that are here to copy-paste code, this is an example which removes the MODULE directory from REPO repository.
Step 1: Extract the directory from the git repository
Clone the original repository: