We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
Do the following to check out the GAPID source code on GitHub:
- Sign up for GitHub at https://github.com/ if you don’t already have an account.
- (Optional) Set up an SSH key to connect to your account using SSH.
- (Optional) Add a GPG signing key to your account.
- Go to the project landing page at https://github.com/google/gapid.
- Fork the repository. This creates a copy of the repository in your account.
- Create a work folder on your workstation. The rest of this document assumes
~/work
, adjust as needed. - On your GAPID project page, clone your copy of the repository and add it to your local work folder:
cd ~/work git clone <clone-url> cd gapid
- Add the Google remote repository to your local repository:
git remote add goog [email protected]:google/gapid.git git fetch goog
Use the following commands to configure git for GAPID development:
# Assume the remote branch has the same name as your local branch to make pushing changes easier
git config push.default current
# Default to pushing to your fork (assuming the above directions)
git config remote.pushDefault origin
# Make git clean up all the remote tags it creates when you delete remote branches
git config fetch.prune true
git config user.name <your-name> # Add --global to make this a global setting
git config user.email <[email protected]> # Can also be a global setting
# If you added a GPG signing key, run the following commands:
git config user.signingkey <keyid>
git config commit.gpgsign true
Follow the build instructions in the GAPID repository.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution, this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
Do the following to contribute to the GAPID project:
- Prepare your changes on a dedicated branch in your local repository:
git checkout -b <my-branch>
- Make changes, commit the changes, and squash them into a single commit.
- Use the presubmit script to check code formatting and other things:
# Install clang-format 6.0 sudo apt-get install -y clang-format-6.0 export CLANG_FORMAT=clang-format-6.0 # Run the script ./kokoro/presubmit/presubmit.sh
- Fix potential issues, commit the fix, squash into a single commit again.
- Re-run presubmit script until it passes without warnings.
- Check that the tests pass:
bazel test tests
- Push to your GitHub repo:
git push
- Visit https://github.com/google/gapid to see a pop-up dialog inviting you to open a PR; click on the dialog to create a PR. See Creating a pull request from a fork for more information.
- All submissions, including submissions by project members, require review. You can request specific reviewers for your PR or leave the reviewers section blank. A GAPID team member will review the request.
Consult GitHub Help for more information on using pull requests.