Fido - he fetches

Install

gem install fido -s http://gemcutter.org

Usage

$ fido git://github.com/sinatra/sinatra.git
$ cd sinatra
$ git branch
* master
$ git log --format=%h | head -n1
6d8b333

The second run will perform no operation because it's already been fetched. This is for safety so any local work isn't interupted

$ .. add file and commit
$ cd ..
$ fido git://github.com/sinatra/sinatra.git
$ git log --format=%h | head -n1
71435b7

Branch failover

This is where fido becomes interesting

$ fido git://github.com/sinatra/sinatra.git foo 0.3.x bar baz
$ cd sinatra
$ git branch
* 0.3.x

We told fido we want to clone the sinatra repo and checkout one branch with preference to foo if origin/foo, then 0.3.x, etc.

Destruction

After fido has fetched a repo he knows that it can be bad to interupt any local work. He can be told destruction is ok.

$ fido git://github.com/sinatra/sinatra.git foo 0.3.x bar baz
$ cd sinatra
$ git branch
* 0.3.x

$ cd ..
$ fido git://github.com/sinatra/sinatra.git -f 0.9.x
$ cd sinatra
$ git branch
  0.3.x
* 0.9.x

LICENSE

Copyright (c) 2009 Blake Mizerany

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.