DESCRIPTION:

Cargo is a set of tools to help streamline using git. The type of tools and usage vary, but they represent a process that we’ve adapted to streamline our workflow.

More features will be added. Pivotal integration on git wrapper commands and other features are on the unofficial list.

This is still alpha

FEATURES:

  • Commands to streamline git usage.

  • Server/userscript integration with Pivotal Tracker (and growlnotify).

SYNOPSIS:

Cargo Server:

  • cargo (runs the cargo server that listens for incoming events)

    cargo[git:master] $ cargo
    => Starting Cargo 0.0.2 on http://0.0.0.0:8081
    => Ctrl-C to shutdown server
    ** Cargo listening at 0.0.0.0:8081
    

To install the userscript in either Firefox, or the nightly build of WebKit (requirements outlined below) browse to localhost:8081/cargo.user.js

If you have the proper setup (Greasemonkey / GreaseKit) you’ll be prompted to install the user script. Once installed you’ll be asked when starting a story if a branch should be created automatically, and asked if you’d like your changes committed when finishing a story (prompting is configurable).

Git Wrapper Commands:

  • hack (update master create a topic branch)

    cargo[git:master] $ hack
    Already on "master"
    From [email protected]:factorylabs/cargo
    * branch            master     -> FETCH_HEAD
    Topic name (story): fix_issue
    Story number (optional): 1234
    Switched to a new branch "fix_issue_1234"
    cargo[git:fix_issue_1234] $
    
  • pack (switch to master and merge branch)

    cargo[git:fix_issue_1234] $ pack
    Switched to branch "master"
    cargo[git:master] $ git status
    On branch master
    Your branch is ahead of 'origin/master' by 7 commits.
    
    nothing to commit (working directory clean)
    cargo[git:master] $
    
  • ship (switch to master and merge branch push to remote origin, delete topic branch)

    cargo[git:fix_issue_1234] $ ship
    Switched to branch "master"
    Counting objects: 60, done.
    Compressing objects: 100% (45/45), done.
    Writing objects: 100% (46/46), 16.92 KiB, done.
    Total 46 (delta 23), reused 0 (delta 0)
    To [email protected]:factorylabs/cargo.git
      41e9cfb..b51cba0  master -> master
    cargo[git:master] $ git branch
    * master
    cargo[git:master] $
    
  • yank (rebase current branch with latest from master)

    cargo[git:fix_issue_1234] $ yank
    Switched to branch "master"
    From [email protected]:factorylabs/cargo
    * branch            master     -> FETCH_HEAD
    Switched to branch "fix_issue_1234"
    Current branch fix_issue_1234 is up to date.
    cargo[git:fix_issue_1234] $
    

REQUIREMENTS:

The Cargo server and userscript integration for pivotal tracker requires one of the following setups:

Future support will include:

  • Nightly Build of WebKit (OS X r42858)+, and GreaseKit that can be found at 8-p.info/greasekit/

  • Fluid support should be coming with the next public update of Safari.

INSTALL:

sudo gem install factorylabs-cargo --source=http://gems.github.com

Setup:

echo "api_key: YOUR_PIVOTAL_TRACKER_API_KEY"  > ~/.cargo.yml

LICENSE:

(The MIT License)

Copyright © 2009 Factory Design Labs

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.