{endsnip} {linebreak} +*MAKE A GITTRAC TICKET FOR THE PULL REQUEST.* -*IT IS VERY IMPORTANT THAT YOUR MERGE THE PULL REQUEST INTO THE BRANCH IT WAS CREATED FROM*. +Create a new ticket, fill in the description with the reason for the change, fill in the customer group if known, the target release, etc. Add a remark with a code review signing off on the changes. Examples below use ticket number 9999. + +*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. +Now that you know the target branch, create a new branch with the correct name and the gittrac ticket number from the ticket you created above. You will also need to know the pull request number for this step. -{snip: Example 1: 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 +{snip: Example 1: create a branch targeting *master* (V8_9 in this example) for the github pull request (ID 107 here) and the gittrac ticket (9999 here)} +git fetch github pull/107/head:V8_9-gt9999-branch {endsnip} -{snip: Example 2: create a branch targeting *stable* (V8_8 in this example) for github pull request ID 107} -git fetch github pull/107/head:V8_8-pr107 +{snip: Example 2: create a branch targeting *stable* (V8_8 in this example) for the github pull request (ID 107 here) and the gittrac ticket (9999 here)} +git fetch github pull/107/head:V8_8-gt9999-branch {endsnip} @@ -34,10 +37,10 @@ *MOST LIKELY*, the pull request was made from master. So you probably want to just do this: -{snip: Example: check out the master and merge the V8_9-pr107 branch created above} +{snip: Example: check out the master and merge the V8_9-gt9999-branch created above} git checkout master git pull -git merge V8_9-pr107 +git merge V8_9-gt9999-branch # ADD THE GITTRAC TICKET NUMBER TO MERGE COMMIT MESSAGE!! git push master {endsnip} @@ -45,8 +48,8 @@ {snip: Example: Cherry-pick the commit(s) back to stable (V8_8-branch in this example)} git checkout V8_8-branch git pull -git cherry-pick <commit-hash-1> -git cherry-pick <commit-hash-2> +git cherry-pick <commit-hash-1> # ADD THE GITTRAC TICKET NUMBER TO CHERRY-PICK COMMIT MESSAGE!! +git cherry-pick <commit-hash-2> # ADD THE GITTRAC TICKET NUMBER TO CHERRY-PICK COMMIT MESSAGE!! ... git push V8_8-branch {endsnip} @@ -56,7 +59,7 @@ {snip: Example: Merge the pull request into a stable branch (V8_8-branch in this example) and then forward into master} git checkout V8_8-branch git pull -git merge V8_8-pr107 +git merge V8_8-gt9999-branch # ADD THE GITTRAC TICKET NUMBER TO MERGE COMMIT MESSAGE!! git push V8_8-branch git checkout master git pull @@ -65,6 +68,6 @@ {endsnip} {linebreak} -*THAT'S IT!* If you targeted the correct branch, the pull request should automatically close when gethub detects the SHA was merged. +*THAT'S IT FOR MERGING!* If you targeted the correct branch, the pull request should automatically close when gethub detects the SHA was merged. Don't forget to add documentation and Version History if needed and reference the associated gittrac ticket number so everything is nicely grouped togther under the one ticket. {linebreak}