Merge in GitHub pull requests, possibly making changes to them first

I recently started managing a project on GitHub where people have been submitting pull requests. Rather than merge them to master, I would like the ability to:

  1. First vet them to make sure they actually work

  2. github fork fetch all the changes from the original repo
  3. I need help setting up a github webhook with a localhost jenkins
  4. How do I receive/send information from/to GitHub using android App
  5. How do you merge changes on non-master branches from a forked github repository?
  6. I am not able to push my code on git?
  7. Github switching fork parent
  8. Possibly making some stylistic changes before merging to master

How can I do this?

Do you have to make a separate branch, such as “dev”, and instruct people to code against that before you merge to master?

  • How to delete something that was accidentally pushed
  • Publish a project release (binary/source packages) on Github?
  • Problems with git submodules when submodules are private Github repos
  • Correct setting for git autocrlf as per use case
  • fatal: 'origin' does not appear to be a git repository
  • Why is the working directory of master not clean after pull?
  • 2 Solutions collect form web for “Merge in GitHub pull requests, possibly making changes to them first”

    There is a github help page on this which details how to make changes to a pull request by checking out pull requests locally.

    What I might try is first creating a remote for the pull request submitter (I’m using the examples from the above page):

    git remote add kneath git://

    Fetch the changes:

    git fetch kneath

    Check out the branch in question (ex. master):

    git checkout kneath/master

    Vet them however you like, since the code that will be there will be the pull request code. Run tests, etc.

    Merge them in if you’re good to go:

    git checkout master
    git merge kneath/master

    Further, here is a very good page on git project management workflows which details the various workflows one can take on collaboration integration.

    A faster way of doing things with GitHub is to use this GitHub feature presented by Zach Holman in his GitHub Secrets II Talk (video).

    git fetch origin pull/id/head:name

    Where id is the pull request id, head is the remote branch (on the fork), and name is the name you want to give the local branch. For example:

    git fetch origin pull/12/head:pr

    Fetches pull request #12 into a branch named pr.

    You can add this as an alias in git if you use this a lot.

    Git Baby is a git and github fan, let's start git clone.