Home

Awesome

Git submodule helper scripts & gui

A collection of scripts that should help make life with git submodules easier. They are aimed at the case with a central repository. The submodules are thought not only as quasi static repositories, but as something where active development happens. The scripts support two levels of submodules, but most scripts do not support more than that.

gitR is a simple graphical interface that should make working with submodules even easier. It only covers the basic functionality required for an average user. The main advantage in working with the graphical interface lies in the way the status of the repository is presented: the user always sees the full status of the repository and the submodules without the need to actively query for it.

How to use

The standard (one-person-working) work flow is as follows:

Using tags (and branches):

The same can be done for branches - at least in theory. The scripts were not developed with this case in mind. Note that there are no scripts that help with the creation or merging of branches for all submodules or something similar (on purpose, how would you do that?). The scripts will just try to attach the HEAD to the correct branch if the submodules feature different branches.

Working together

Then there are a couple of scripts that help to recover from conflicts that will probably arise when working simultaneously at the same super repository.

See also tests.sh for an example work flow on how to recover from conflicts.

Main scripts

Commands that start with an "r" (for "recursive") followed by some familiar git command name are do just what they should do, but with some added functionality that should simplify the work with submodules.

Helper Scripts

Some commands that are just thought to be used internally.

Other Stuff

Installation

Clone the repository and then add <path-to-repository>/bin to your $PATH.

To make git rstatus work on Windows, download the binary of 'mktemp' for Windows from the GnuWin32 project here. Place it in C:\Program Files\Git\bin. (Thanks to TheKirk for this hint.)

The following steps and dependencies are only required if one likes to use the graphical interface gitR.

gitR requires an current R installation (http://www.r-project.org) and requires the R-package (contained in gitR-package/) to be installed. Before installing the package, make sure to have installed the R-packages

Known Problems

Copyright/License

License: GPL v2 Copyright (c) 2012 Manuel Koller