Checkout github pull requests locally

Edit .git/config and add bold text below:


[remote "origin"]
        url = https://github.com/you/your_project.git
        fetch = +refs/heads/*:refs/remotes/origin/*
        fetch = +refs/pull/*/head:refs/remotes/origin/pr/*  


[branch "master"]
        remote = origin
        merge = refs/heads/master 


[remote "master"]
        url = https://github.com/friend
/friend_project.git
        fetch = +refs/heads/*:refs/remotes/master/*
        fetch = +refs/pull/*/head:refs/remotes/master/pr/*



Then do:

git fetch --all

And merge example:

git merge remotes/origin/pr/2


Comments

Popular posts from this blog

Ports to allow for whatsapp call

Manually clean up zimbra zmcat/zmcpustat exploit

Keychron K2 in Linux