We have a Git repository which contains a number of subdirectories. Now we have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository.
- Prepare the old repo
-P name-of-folder -b name-of-new-branch
- Create the new repo
- Link the new repo to Github or wherever
git remote add origin email@example.com:my-user
git push origin -u master
- Cleanup, if desired