Ich wollte ein großes (teilweise geschlossenes) git-Repo in kleinere (teils öffentliche) git-Repos aufteilen.
Hier meine Anleitung
cp ~/orig-Repo ~/new-Repo
cd ~/new-Repo
git filter-branch --prune-empty --subdirectory-filter Verzeichnis-Name Branch-Name
Verzeichnis-Name
: Das Verzeichnis, das das Neue Repo beinhalten sollBranch-Name
: Der zukünftige Branche-Name (z. B. master)git remote set-url origin https://<GIT-SERVER-TLD>/<USERNAME>/<NEW-REPOSITORY-NAME>.git
git remote -v
git push -u origin Branch-Name