From 4eaf671fcfcaf78802f6fc719540d906407db5b5 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sun, 5 Oct 2014 22:50:06 +0300 Subject: [PATCH] bashrc & zshrc: add github-add-pulls Fetches also GitHub pull requests so they can be interacted without using GitHub web interface. This also checks pull requests for remote upstream. Via http://git.io/-C-0oQ --- bashrc | 6 ++++++ zshrc | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/bashrc b/bashrc index 16ff5c54..ded8a4ac 100644 --- a/bashrc +++ b/bashrc @@ -842,6 +842,12 @@ function sysctl-undo-mikaela() { set +x } +# Add GitHub pull requests to fetched things via http://git.io/-C-0oQ +github-add-pulls() { + git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*' + git config --add remote.upstream.fetch '+refs/pull/*/head:refs/remotes/upstream/-pr/*' +} + # .custom if [ -f ~/.custom ]; then source ~/.custom diff --git a/zshrc b/zshrc index 05cc7ea3..f25baba8 100644 --- a/zshrc +++ b/zshrc @@ -815,6 +815,11 @@ function sysctl-undo-mikaela() { set +x } +# Add GitHub pull requests to fetched things via http://git.io/-C-0oQ +github-add-pulls() { + git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*' + git config --add remote.upstream.fetch '+refs/pull/*/head:refs/remotes/upstream/-pr/*' +} # Source files for miscannellious modifications.