Accepting a PR on GitHub

So you have had a Pull Request from someone wrt your repository. How to check it out before accepting it. Also, a C++ compilation error plus its answer.

  1. Get the Pull Request Id.
    • Go to the Pull Request in GitHub
    • Look for the hash number in the PR title.
    • eg Adding blockly examples #4
    • PR Id is 4 in this case.
  2. Make clean clone of the repository
  3. Run the following command in the cloned directory:
    git fetch origin pull/4/head && git checkout FETCH_HEAD
    • The 4 is replaced by the PR Id.
  4. Build and run this version of the repository and note any follow up changes you think needed.
  5. Accept the Pull Request in GitHub.
  6. Go back to your original copy of the repository and sync it.
  7. Make the changes you deemed required from 3.
  8. Push those updates back to the repository.
  9. Delete the test directory.

A compilation error: C++ programming

default argument given for parameter 1

You are probably redefining the default parameter in the implementation of the function. It should only be defined in the function declaration. 2nd answer here

Where you define a class in a header file, only put default parameters there. Don’t also put in the source file.


 TopicSubtopic
  Next: > Softata
<  Prev:   Arduino
   
 This Category Links 
Category:DevOps Index:DevOps