Skip to content

Instantly share code, notes, and snippets.

@kwstannard
Created March 18, 2014 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwstannard/9625610 to your computer and use it in GitHub Desktop.
Save kwstannard/9625610 to your computer and use it in GitHub Desktop.
#! /usr/bin/ruby
branch_match = `git branch`.match(/FY-#{ARGV[0]}\w+/)
branch = branch_match ? branch_match[0].to_s : ARGV[0]
`git checkout #{branch}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment