git-pr
facilitates GitHub pull requests.
Add this line to your application's Gemfile:
gem 'git-pr'
And then execute:
$ bundle
Or install it yourself as:
$ gem install git-pr
Setup a personal access token and configure your git for github:
$ git config --global github.user your_github_user_name
$ git config --global github.token your_github_personal_access_token
To use a private GitHub Enterprise installation:
$ git config --global github.apiEndpoint https://my.server/api/v3
List pull requests:
$ git pr list # open pull requests for the active repository
$ git pr list --all # open pull requests for all my user and
# organization repositories
You can also configure repository profiles and use those to query multiple repositories at once:
$ git config --global --add pr.repository_profile.work org/one
$ git config --global --add pr.repository_profile.work org/two
$ git pr list --profile work # open pull requests for 'org/one', 'org/two'
Submit a pull request for the current branch:
$ git pr submit --title "my title" --message "longer description"
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request