- git clone
- cd
- git remote rm origin
- git filter-branch --subdirectory-filter <directory 1> -- --all
You may need also to merge histories, if the new repo already exists. In order to do that, make:
- git pull --allow-unrelated-histories
And finally,
- git remote add
- git push -u origin master