Home

revans edited this page Sep 13, 2010 · 3 revisions
Clone this wiki locally

Git Tools

Git Tools is an easy way to manage your git submodules. Eventually it might be more, but for now it’s about making submodule management dead simple.

The first thing you need to do is to create a configuration file which tells Git Tools what plugins you want to track. At this time only plugins and rails itself are supported. Add submodule.yml to your config/ directory and define your submodules like so:

submodules:
  rspec: git://github.com/dchelimsky/rspec.git
  rspec_rails: git://github.com/dchelimsky/rspec-rails.git
  rails: git://github.com/rails/rails.git

Defining it as “submodules:” is important as it is a hook that Git Tools uses to know what submodules to manage. The name value should be the name of the plugin and how you’d like for the folder to be named in your vendor/ directory. For example, I have rspec_rails specified as the name in the above and it will be installed as: vendor/plugins/rspec_rails. The value is where the repository for that plugin lives.

There are three basic commands right now:

   gitools setup      # does the init and update for a new repo clone
   gitools update    # you can pass either all or the submodule name to do an update of that repo
   gitools add         # you can pass either all or the submodule name that you would like to add

   gitools update all
   gitools update rails

   gitools add all
   gitools add rspec