Skip to content

Instantly share code, notes, and snippets.

@garyharan
Created August 16, 2013 14:22
Show Gist options
  • Save garyharan/6250348 to your computer and use it in GitHub Desktop.
Save garyharan/6250348 to your computer and use it in GitHub Desktop.
We use a convention where each branch is created from an issue. This converts the branch to a pull request in a single command.
cp pcb ~/bin/ # where bin is in your $PATH
chmod +x ~/bin/pcb
#!/bin/bash
current_branch_name () {
git branch | grep "*" | sed s/\*[^\d]//
}
current_branch_number () {
current_branch_name | sed s/[^0-9]*_[^0-9]*//
}
open $(hub pull-request -b hipyard:master -h hipyard:$(current_branch_name) -i $(current_branch_number))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment