bgit is a Perl wrapper to Git, adding some features that I find particularly useful, particularly when working with git-svn repositories.

The current version is available here.

## Features

#### Support for SVN Externals

bgit reads a configuration file in:

.git/bgit-config


Which allows you to provide a list of branches, and the folders that are externals for those branches. eg:

[master]
external="ProjectA"
external="ProjectB"


Each of the folders indicated is expected to, themselves, be git-svn projects, containing the external code. Once this is in place, a checkout will cause the external projects to be moved into:

.git/externals


At which point the branch switch is performed, and then the externals for the target project are moved out of the aforementioned folder into their appropriate locations.

Additionally, ‘git svn rebase’ will rebase all the externals, in addition to the master project.

#### SVN Cherry-picking

Oftentimes, in an git-svn repository, I have multiple remote svn branches that I’m tracking, and need to cherrypick between. However, because SVN has no form of merge tracking, upon commit, it’s not obvious where a cherrypicked change came from.

As such, bgit implements a new command:

git svn cherry-pick <hash>


The command inspects the commit indicated, pulls out information about the SVN revision, and automatically generates a new changelog of the following format:

Bug <bug#> (this may not be present if no bug was referenced in the original commit).
Merged from <svn branch> at r<svn rev>:

<original commit message>