Unnamed repository; edit this file 'description' to name the repository.
git clone git://
Log | Files | Refs | README | LICENSE

commit 7a5170f0fef394585d5a699b9d8f1cfb01b407df
parent 089e850a679aa18bb5c16f49381313b4c7c7026a
Author: Nihal Jere <>
Date:   Tue, 11 Jan 2022 15:32:19 -0600

add README with usage and license

ALICENSE | 13+++++++++++++ | 43+++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/LICENSE b/LICENSE @@ -0,0 +1,13 @@ +Copyright 2021-2022 Nihal Jere <> + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. diff --git a/ b/ @@ -0,0 +1,43 @@ +# git-submodule-integrate + +This script automates the process of copying a git repository into a +subdirectory of another git repository, and preserving its history. Since git +submodules are just git repositories, the script can be used to incorporate a +submodule and its history into a parent repository. + +## Usage + +The script acts on two repositories: the parent repo and the child repo. Once +the script has been run, the parent repo will contain the child repo in a +subdirectory. + +First, you'll need copies of the parent and child repositories in separate +directories. So if the child repository is a submodule, you'll need to clone it +into its own repo, outside of the parent. We will assume that `$PARENT` is the +path to the parent repository and `$CHILD` is the path to the child repository. + +Next, download the script somewhere. We will assume the path of the script is +`$GSI`. + +Now set your working directory to the parent repository + +``` +$ cd $PARENT +``` + +If you're trying to integrate a submodule, you need to remove the submodule from +the parent repository. This can be accomplished with + +``` +$ git rm path/to/submodule && git commit +``` + +Now pick a name for the subdirectory `$DEST` where you want the child repository +to be placed and run + +``` +$ $GSI $CHILD $DEST +``` + +Of course +Depending on the size of your repo and commits, it may take a while.