Skip to content

Instantly share code, notes, and snippets.

@darnould
Last active August 29, 2015 14:14
Show Gist options
  • Save darnould/bc4120b36ecf667149e5 to your computer and use it in GitHub Desktop.
Save darnould/bc4120b36ecf667149e5 to your computer and use it in GitHub Desktop.
Merging PRs from forks (using squash)

Squash-merging PRs from forks

This example uses PR #2. Replaces all instances of 2 with the ID you're looking to merge (using squash).

  • git checkout master
  • git fetch origin pull/2/head:2
  • git merge --squash 2
  • git commit
  • git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment