Skip to Content

Useful Git hacks

Git clone someone's Github Pull Request locally

git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'
git fetch
git checkout -t origin/pr/12

Based on https://gist.github.com/piscisaureus/3342247

@vojtechvitek

Join in on the conversation with Vojtech Vitek when you subscribe to Vojtech's IT Blog.