1# Contributing to gRPC: A Step-By-Step Guide 2 3Note: This document is not meant for Google employees. 4 5## Prerequisites 6 7To contribute to the gRPC codebase, you need the following: 8 91. An 10 [active GitHub account](https://docs.github.com/en/get-started/quickstart/creating-an-account-on-github) 111. [An understanding of Git and GitHub](https://docs.github.com/en/get-started/using-git/about-git) 121. [Knowledge of how to fork a repository, clone a repository, merge, rebase, 13 resolve, push, pull, fetch 14 etc.](https://docs.github.com/en/get-started/using-git/about-git) 151. [git installed and working on your machine](https://github.com/git-guides/install-git) 161. Knowledge of the language being used, which can be C++, Python, Ruby, 17 Objective-C, PHP, or C#. 18 19## Steps to Contribute gRPC C++ Code 20 21The GitHub repository for the C-based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) 22is at https://github.com/grpc/grpc. 23 24### Fork and Clone the Repository 25 26If you want to contribute to the gRPC code base, you need to make a fork of the 27repository. 28 291. Create your 30[own fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) 31from https://github.com/grpc/grpc. 32 33  34 351. [Clone your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#cloning-your-forked-repository) 36on your local machine. 37 38### Prepare and Push Your Commit 39 401. In your cloned repository, create a new branch from `master`. 411. Then prepare a commit for the files that you want to contribute. 421. Commit to this branch. 431. Push the commit to your fork on GitHub. 44 45Take care that your commits are aligned with these 46[guidelines](https://github.com/grpc/grpc/blob/master/CONTRIBUTING.md#guidelines-for-pull-requests). 47 48### Prepare a Pull Request 49 50After pushing your commit, visit https://github.com/grpc/grpc . If the 51forking, branch creation, commit and push have been successful, you will see 52the following message: 53 54 55 56Take care to allow edits by maintainers. If there is a specific issue 57with your pull request, the maintainer can help if needed. This access to help will reduce 58the turnaround time for your submission. 59 60 61 62Create a pull request. 63 64### Pull Request Status - Safe Review 65 66Once the pull request is ready, you must wait for a reviewer to be 67assigned to your pull request. 68 69If you see *Not Covered* in the EasyCLA screen, as shown in the following image, 70click on the mentioned link to start the authorization process. 71 72 73 74You will see a series of screens: 75 761. Select *Authorize LF-Engineering: 77 78 79 801. Select your contributor type: 81 82 83 841. Select *SIGN CLA*: 85 86 87 88Some time after you've digitally signed the document, the EasyCLA will appear as 89*Covered*. 90 91 92 93 After a few hours, you will notice a new "assignee" assigned to the pull request. 94 95 96 97After a reviewer is assigned to you, they will help with the next 98steps, which are as follows: 99 1001. You complete the code review and address the comments. 1011. Your reviewer may add a few labels as needed. 102 103### Pull Request Status - Green 104 105Once you have approval from the reviewer, check if the tests are running. After 106the tests are complete, look at the status of all the tests. If 107everything is green, everything is good. But usually some failures exist. If 108there are failures, select each failure. The selection will take you to a page 109that has error details. Try to fix the issue. 110 111### Pull Request Approval 112 113For pull requests that are non-trivial, there is a thorough code review process. 114You can read more about the process and requirements 115[here](https://github.com/grpc/grpc/blob/master/CONTRIBUTING.md#guidelines-for-pull-requests). 116 117After you fix the code review, you will finally get an approval. After getting 118approval, you can submit the pull request. 119 120 121 122### Submission 123 124You **cannot** do submission or merge of a pull request through Github. 125 126 127 128After you have approval from a reviewer, a Google employee will trigger 129the submission process. When the submission happens: 130 1311. A commit with your changes, along with a few additional formatting changes, will 132 be committed to the `grpc/master` branch. 133 134 1351. The pull request you originally created will be closed. 136 137 138