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
This commit is contained in:
Mikaela Suomalainen 2014-10-05 22:50:06 +03:00
parent 9b08d843a0
commit 4eaf671fcf
2 changed files with 11 additions and 0 deletions

6
bashrc
View File

@ -842,6 +842,12 @@ function sysctl-undo-mikaela() {
set +x 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 # .custom
if [ -f ~/.custom ]; then if [ -f ~/.custom ]; then
source ~/.custom source ~/.custom

5
zshrc
View File

@ -815,6 +815,11 @@ function sysctl-undo-mikaela() {
set +x 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. # Source files for miscannellious modifications.