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

      1 # git-submodule-integrate
      3 This script automates the process of copying a git repository into a
      4 subdirectory of another git repository, and preserving its history. Since git
      5 submodules are just git repositories, the script can be used to incorporate a
      6 submodule and its history into a parent repository.
      8 ## Usage
     10 The script acts on two repositories: the parent repo and the child repo. Once
     11 the script has been run, the parent repo will contain the child repo in a
     12 subdirectory.
     14 First, you'll need copies of the parent and child repositories in separate
     15 directories. So if the child repository is a submodule, you'll need to clone it
     16 into its own repo, outside of the parent. We will assume that `$PARENT` is the
     17 path to the parent repository and `$CHILD` is the path to the child repository.
     19 Next, download the script somewhere. We will assume the path of the script is
     20 `$GSI`.
     22 Now set your working directory to the parent repository
     24 ```
     25 $ cd $PARENT
     26 ```
     28 If you're trying to integrate a submodule, you need to remove the submodule from
     29 the parent repository. This can be accomplished with
     31 ```
     32 $ git rm path/to/submodule && git commit
     33 ```
     35 Now pick a name for the subdirectory `$DEST` where you want the child repository
     36 to be placed and run
     38 ```
     39 $ $GSI $CHILD $DEST
     40 ```
     42 Depending on the size of your repo and commits, it may take a while.