To merge a pull request from github into your htcondor repository, you need to add github as a remote repository, and then create a new branch from the pull request. *Following these directions will preserve authorship and timestamps.* Adding github as a remote repository is something you only need to do once for a given repo: {snip: One-time config: add the github htcondor repository as a remote repository called github} git remote add github https://github.com/htcondor/htcondor.git {endsnip} Here is the general form for converting a github pull request to a branch. Below this you will see many specific examples showing the convention for branch naming and commands to run in various different scenarios. {snip: General: fetch a pull request ID from remote github creating branch BRANCHNAME} git fetch github pull/ID/head:BRANCHNAME {endsnip} {linebreak} *IT IS VERY IMPORTANT THAT YOUR MERGE THE PULL REQUEST INTO THE BRANCH IT WAS CREATED FROM*. Most people create pull requests off of the master branch. Look at the pull request on github, and near the top, directly under the title you will see a line similar to this: {snip: Example message on github website} zmiller wants to merge 1 commit into htcondor:master from zmiller:changing-some-htcondor-code {endsnip} Now that you know the target branch, create a new branch with the correct name and the pull request number. {snip: Example: create a branch targeting master (V8_9 in this example) for github pull request ID 107} git fetch github pull/107/head:V8_9-pr107 {endsnip} Now check out the target branch and merge the branch containing the pull request. {snip: Example: check out the master and merge the V8_9-pr107 branch created above} git checkout master git pull git merge V8_9-pr107 git push {endsnip} *THIS IS RARE*, but if the pull request was targeted for stable (or a release branch) do the normal merges forward (consult with TimT and TJ if dealing with a release branch). {snip: Example: Merge the stable branch forward into master} git checkout master git pull git merge V8_8-branch git push {endsnip} *MORE LIKELY*, if the pull request was made from master but should also apply to stable (because it's a bug fix), then cherry-pick the commit back to the correct branch. {snip: Example: Cherry-pick the commit back to stable (V8_8-branch in this example)} git checkout V8_8-branch git cherry-pick git push {endsnip} {linebreak} *THAT'S IT!* If you targeted the correct branch, the pull request should automatically close when gethub detects the SHA was merged. {linebreak}