This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Move a subdirectory from 1 repository to another | |
# Source Repo | |
git clone <git repository A url> | |
cd <git repository A directory> | |
git remote rm origin | |
git filter-branch --subdirectory-filter <directory 1> -- --all | |
mkdir <directory 1> | |
git mv <directory 1 contents> <directory 1> | |
git commit |