Skip to content

Instantly share code, notes, and snippets.

@kpman
Last active July 3, 2017 14:42
Show Gist options
  • Save kpman/3343a2f1c1d46b02786bdcd5397bbb86 to your computer and use it in GitHub Desktop.
Save kpman/3343a2f1c1d46b02786bdcd5397bbb86 to your computer and use it in GitHub Desktop.
Auto send pull-request to GitHub and using the latest commit message as PR title.

Install hub

Edit your aliases setting

$ vim ~/.oh-my-zsh/lib/aliases.zsh (in my case)

alias pr='hub pull-request -m "$(git reflog -1 | sed '\''s/^.*: //'\'')" | xargs open'

Source rc file

$ source ~/.zshrc (in my case)

Usage

$ git push origin <branch-name> && pr
@kpman
Copy link
Author

kpman commented Jul 3, 2017

Nice suggestion!
Added it to the alias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment