<commit_before>---
layout: post
title: Create a Github Pull Request from the terminal
category: terminal
---

To simply create a Github Pull Request on the site from the current active directory use this snippet

{% highlight bash %}
 function git_pull_request()
 {
    local NAME=`git rev-parse --abbrev-ref HEAD`
    local PATH_REPO=`git remote show -n origin | grep Push | cut -d: -f2- | cut -d/ -f 1- | tr -d " "  | cut -d. -f-2`
    git push origin $NAME
    echo $PATH_REPO
    open $PATH_REPO/compare/$NAME
}

{% endhighlight %}


You can probably find a more up to date version in my [dotfiles](https://github.com/genintho/dotfiles)

<commit_msg>forgot the date of the post<commit_after>---
layout: post
title: Create a Github Pull Request from the terminal
date:   2014-11-25 23:13:30
category: terminal
---

To simply create a Github Pull Request on the site from the current active directory use this snippet

{% highlight bash %}
 function git_pull_request()
 {
    local NAME=`git rev-parse --abbrev-ref HEAD`
    local PATH_REPO=`git remote show -n origin | grep Push | cut -d: -f2- | cut -d/ -f 1- | tr -d " "  | cut -d. -f-2`
    git push origin $NAME
    echo $PATH_REPO
    open $PATH_REPO/compare/$NAME
}

{% endhighlight %}


You can probably find a more up to date version in my [dotfiles](https://github.com/genintho/dotfiles)


{'fraction_non_alphanumeric': 0.10888888888888888, 'fraction_numerical': 0.014814814814814815, 'mean_word_length': 3.1569230769230767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7387345', 'n_tokens_mistral': 472, 'n_tokens_neox': 427, 'n_words': 174}