Skip to content

Instantly share code, notes, and snippets.

@n01r
Last active February 11, 2020 08:38
Show Gist options
  • Select an option

  • Save n01r/c7c014fc652cab38c9c5bb49f53d8393 to your computer and use it in GitHub Desktop.

Select an option

Save n01r/c7c014fc652cab38c9c5bb49f53d8393 to your computer and use it in GitHub Desktop.
Better way to check out a pull request from GitHub
#!/bin/bash
cd <local/github/repository>
# here mainline is the alias for the main repository
git fetch mainline pull/<PR no.>/head:<new-branch-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment