Instructions
-
cd to the top-level directory of the project or open bash here
Terminal window cd <path/to/main-repo-folder> -
[Main Repo] Split the target folder into a temporary branch
Terminal window git subtree split -P <path/to/target-folder> -b <name-of-temp-branch> -
[Main Repo] Recursively remove the target folder
Terminal window git rm -rf <path/to/target-folder> -
[Main Repo] Create a new repository folder (Use the previously deleted folder path if setting it up as a submodule)
Terminal window mkdir -pv <path/to/new-repo-folder> -
[Main Repo] Navigate to the new repository folder
Terminal window cd <path/to/new-repo-folder> -
[New Repo] Initialize the repository
Terminal window git init -
[New Repo] Pull the temporary branch
Terminal window git pull <path/to/main-repo-folder> <name-of-temp-branch> -
[New Repo] (Optional) Check if any commit msg needs to be reworded
Terminal window git rebase -i --root -
[New Repo] Add the remote origin
Terminal window git remote add origin <url-of-new-repo> -
[New Repo] Push local changes to the remote repository
Terminal window git push -u origin master -
[New Repo] Navigate back to the main repository folder
Terminal window cd <path/to/main-repo-folder> -
[Main Repo] Delete the temporary branch
Terminal window git branch -D <name-of-temp-branch> -
[Main Repo] (Optional) Add the independent repository as a submodule
Terminal window git submodule add <url-of-new-repo> <path/to/new-repo-folder>
Branch
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)$ git subtree split -P server -b tempCreated branch 'temp'4b36120869a031f38120ac71b0264f5545886471
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)$ git rm -rf serverMigrating git directory of 'server/AudioProcessor' from'D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/AudioProcessor/.git' to'D:/Projekt/Python Projects/Easy-Voice-Toolkit/.git/modules/AudioProcessor'Migrating git directory of 'server/GPT_SoVITS' from'D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/GPT_SoVITS/.git' to'D:/Projekt/Python Projects/Easy-Voice-Toolkit/.git/modules/GPT-SoVITS'Migrating git directory of 'server/VPR' from'D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/VPR/.git' to'D:/Projekt/Python Projects/Easy-Voice-Toolkit/.git/modules/VPR'Migrating git directory of 'server/Whisper' from'D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/Whisper/.git' to'D:/Projekt/Python Projects/Easy-Voice-Toolkit/.git/modules/Whisper'rm 'server/AudioProcessor'rm 'server/GPT_SoVITS'rm 'server/VPR'rm 'server/Whisper'rm 'server/main.py'rm 'server/routers.py'rm 'server/tools.py'rm 'server/utils/__init__.py'rm 'server/utils/logger.py'
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)$ mkdir -pv server
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)$ cd server
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (dev)$ git initInitialized empty Git repository in D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/.git/
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (master)$ git pull "D:/Projekt/Python Projects/Easy-Voice-Toolkit" tempremote: Enumerating objects: 32, done.remote: Counting objects: 100% (32/32), done.remote: Compressing objects: 100% (18/18), done.remote: Total 32 (delta 17), reused 15 (delta 13), pack-reused 0 (from 0)Unpacking objects: 100% (32/32), 7.12 KiB | 117.00 KiB/s, done.From D:/Projekt/Python Projects/Easy-Voice-Toolkit * branch temp -> FETCH_HEAD
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (master)$ git remote add origin https://github.com/Spr-Aachen/EasyVoiceToolkit-Backend.git
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (master)$ git push -u origin masterEnumerating objects: 32, done.Counting objects: 100% (32/32), done.Delta compression using up to 16 threadsCompressing objects: 100% (31/31), done.Writing objects: 100% (32/32), 6.73 KiB | 1.35 MiB/s, done.Total 32 (delta 17), reused 0 (delta 0), pack-reused 0 (from 0)remote: Resolving deltas: 100% (17/17), done.To https://github.com/Spr-Aachen/EasyVoiceToolkit-Backend.git * [new branch] master -> masterbranch 'master' set up to track 'origin/master'.
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (master)$ cd "D:/Projekt/Python Projects/Easy-Voice-Toolkit"
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)$ git branch -D tempDeleted branch temp (was 4b36120).
Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)$ git submodule add https://github.com/Spr-Aachen/EasyVoiceToolkit-Backend.git serverAdding existing repo at 'server' to the indexwarning: in the working copy of '.gitmodules', LF will be replaced by CRLF the next time Git touches itSome information may be outdated