A shell script to merge related child repositories into one parent repository.
See this blog post walking through the creation of this script.
Requires Git >= 2.9.0
- Copy this script into the directory where you wish to create the local parent directory
cd /name/of/local/directory
curl -o git-submergify.sh https://github.com/TheWillGabriel/git-submergify/raw/master/git-submergify.sh
- Make the script executable
chmod +x git-submergify.sh
-
Create an empty GitHub repository as the new remote parent
note: You must be authorized to connect to your GitHub account using SSH -
Run the script
Interactive mode:
./git-submergify.sh -i
Non-interactive mode:
./git-submergify.sh GIT_USERNAME PARENT_NAME "CHILD_1 CHILD_2 CHILD_3 [...]"