Started this before I knew apenwarr's existed, then never finished it. Use apenwarr's instead.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Tries to present an easy-to-use interface for git's subtree merge strategy.
It's meant to work like git submodules but without the suckage.


  cd vendor/plugins
  git-subtree clone git://
  git commit     (note: this step will probably go away)

Now you have a vendor/plugins/will_paginate directory, complete with
full history.

When changes appear upstream, you can pull them into your subtree

  cd vendor/plugins/will_paginate
  git-subtree pull

(pull is, of course, a combination of git-subtree fetch and git-subtree merge)

Help works.  Run 'git-subtree help' to see what commands you have at
your disposal, or 'git-subtree help merge' for help on a specific command.


Just copy git-subtree somewhere on your path.


Why isn't there a 'git-subtree checkout' command?

  You can only merge to subtrees.  It doesn't make sense to check them out.
  A subtree is really no different from a git branch -- you can't really
  go backward (well, you can merge revert commits, ugh).  So, if you ever
  want to checkout a whole new subtree, rather than merging, you should
  probably just delete it then clone it at the desired commit.

How do I move a subtree to a differet directory or delete it?

  The usual git commands: git mv and git rm.  That should be all you need.

  There is a minor catch.  git-subtree stores the branch that you most
  recently merged into each subtree in the .git-subtrees file.
  If you move a subtree, this file will be out of date.  No problem,
  git subtree will ask you to explicitly name a branch the next time
  you merge into the subtree in the new location.

  TODO: is there a way to clean this up?