Ease your vendor branch management worries with Piston, a tool to copy vendor / upstream code to your own repository, while preserving your local patches.
Use the import subcommand to grab an external dependency and manage it locally. This subcommand is your main entryway into the world of vendor branch management.
Conceptually, the import subcommand does an svn export or git clone of the external repository, copies each file into a named folder in your working copy, and throws away the clone / exported directory.
When importing from Subversion, you can import any directory, including branches or subdirectories of the project. This is a feature of Subversion, where everything (including branches and tags) are just more directories.
When importing from Git, you can only import the full repository, but you may import any branch, as long as you know it's name. Use the --commit option to tell Piston what to import.
$ piston import git://github.com/rails/acts_as_list.git vendor/plugins/acts_as_list $ piston import --commit 2-2-stable git://github.com/rails/rails.git vendor/rails $ piston import http://svn.edgewall.com/repos/trac/trunk/contrib/workflow/
SYNOPSIS piston import repository [directory] [options]+ PARAMETERS repository (1 -> repository) The repository you wish to Pistonize directory (1 ~> directory=) Where to put the Pistonized repository --verbose=[verbose], -v (0 ~> integer(verbose=0)) Verbosity level (0 to 5, 0 being the default) --quiet, -q --force --dry-run --revision=revision, -r (0 ~> revision) The revision you wish to operate on --commit=commit (0 ~> commit) The commit you wish to operate on --lock Automatically lock down the revision/commit to protect against blanket updates --repository-type=repository-type (0 ~> repository-type=) Force a specific repository type, for when it's not possible to guess --help, -h