Skip to content

Instantly share code, notes, and snippets.

@kpman
Last active July 3, 2017 14:42
Show Gist options
  • Select an option

  • Save kpman/3343a2f1c1d46b02786bdcd5397bbb86 to your computer and use it in GitHub Desktop.

Select an option

Save kpman/3343a2f1c1d46b02786bdcd5397bbb86 to your computer and use it in GitHub Desktop.

Revisions

  1. kpman revised this gist Jul 3, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion auto-pull-request.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@
    ```
    $ vim ~/.oh-my-zsh/lib/aliases.zsh (in my case)
    alias pr='hub pull-request -m "$(git reflog -1 | sed '\''s/^.*: //'\'')"'
    alias pr='hub pull-request -m "$(git reflog -1 | sed '\''s/^.*: //'\'')" | xargs open'
    ```

    ## Source rc file
  2. kpman created this gist Jun 23, 2017.
    18 changes: 18 additions & 0 deletions auto-pull-request.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    ## Install [hub](https://github.com/github/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/^.*: //'\'')"'
    ```

    ## Source rc file
    ```
    $ source ~/.zshrc (in my case)
    ```

    ## Usage
    ```
    $ git push origin <branch-name> && pr
    ```