Instructions
-
cd to the top-level directory of the project or open bash here
Terminal window 1cd <path/to/main-repo-folder> -
[Main Repo] Split the target folder into a temporary branch
Terminal window 1git subtree split -P <path/to/target-folder> -b <name-of-temp-branch> -
[Main Repo] Recursively remove the target folder
Terminal window 1git 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 1mkdir -pv <path/to/new-repo-folder> -
[Main Repo] Navigate to the new repository folder
Terminal window 1cd <path/to/new-repo-folder> -
[New Repo] Initialize the repository
Terminal window 1git init -
[New Repo] Pull the temporary branch
Terminal window 1git pull <path/to/main-repo-folder> <name-of-temp-branch> -
[New Repo] (Optional) Check if any commit msg needs to be reworded
Terminal window 1git rebase -i --root -
[New Repo] Add the remote origin
Terminal window 1git remote add origin <url-of-new-repo> -
[New Repo] Push local changes to the remote repository
Terminal window 1git push -u origin master -
[New Repo] Navigate back to the main repository folder
Terminal window 1cd <path/to/main-repo-folder> -
[Main Repo] Delete the temporary branch
Terminal window 1git branch -D <name-of-temp-branch> -
[Main Repo] (Optional) Add the independent repository as a submodule
Terminal window 1git submodule add <url-of-new-repo> <path/to/new-repo-folder>
Branch
1Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)2$ git subtree split -P server -b temp3Created branch 'temp'44b36120869a031f38120ac71b0264f55458864715
6Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)7$ git rm -rf server8Migrating git directory of 'server/AudioProcessor' from9'D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/AudioProcessor/.git' to10'D:/Projekt/Python Projects/Easy-Voice-Toolkit/.git/modules/AudioProcessor'11Migrating git directory of 'server/GPT_SoVITS' from12'D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/GPT_SoVITS/.git' to13'D:/Projekt/Python Projects/Easy-Voice-Toolkit/.git/modules/GPT-SoVITS'14Migrating git directory of 'server/VPR' from15'D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/VPR/.git' to16'D:/Projekt/Python Projects/Easy-Voice-Toolkit/.git/modules/VPR'17Migrating git directory of 'server/Whisper' from18'D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/Whisper/.git' to19'D:/Projekt/Python Projects/Easy-Voice-Toolkit/.git/modules/Whisper'20rm 'server/AudioProcessor'21rm 'server/GPT_SoVITS'22rm 'server/VPR'23rm 'server/Whisper'24rm 'server/main.py'25rm 'server/routers.py'26rm 'server/tools.py'27rm 'server/utils/__init__.py'28rm 'server/utils/logger.py'29
30Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)31$ mkdir -pv server32
33Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)34$ cd server35
36Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (dev)37$ git init38Initialized empty Git repository in D:/Projekt/Python Projects/Easy-Voice-Toolkit/server/.git/39
40Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (master)41$ git pull "D:/Projekt/Python Projects/Easy-Voice-Toolkit" temp42remote: Enumerating objects: 32, done.43remote: Counting objects: 100% (32/32), done.44remote: Compressing objects: 100% (18/18), done.45remote: Total 32 (delta 17), reused 15 (delta 13), pack-reused 0 (from 0)46Unpacking objects: 100% (32/32), 7.12 KiB | 117.00 KiB/s, done.47From D:/Projekt/Python Projects/Easy-Voice-Toolkit48 * branch temp -> FETCH_HEAD49
50Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (master)51$ git remote add origin https://github.com/Spr-Aachen/EasyVoiceToolkit-Backend.git52
53Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (master)54$ git push -u origin master55Enumerating objects: 32, done.56Counting objects: 100% (32/32), done.57Delta compression using up to 16 threads58Compressing objects: 100% (31/31), done.59Writing objects: 100% (32/32), 6.73 KiB | 1.35 MiB/s, done.60Total 32 (delta 17), reused 0 (delta 0), pack-reused 0 (from 0)61remote: Resolving deltas: 100% (17/17), done.62To https://github.com/Spr-Aachen/EasyVoiceToolkit-Backend.git63 * [new branch] master -> master64branch 'master' set up to track 'origin/master'.65
66Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit/server (master)67$ cd "D:/Projekt/Python Projects/Easy-Voice-Toolkit"68
69Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)70$ git branch -D temp71Deleted branch temp (was 4b36120).72
73Spr_Aachen@DESKTOP-UEUQRBG MINGW64 /d/Projekt/Python Projects/Easy-Voice-Toolkit (dev)74$ git submodule add https://github.com/Spr-Aachen/EasyVoiceToolkit-Backend.git server75Adding existing repo at 'server' to the index76warning: in the working copy of '.gitmodules', LF will be replaced by CRLF the next time Git touches itSome information may be outdated