|
1 |
| -## Contributing |
| 1 | +## Contributing Guidelines |
2 | 2 |
|
3 | 3 | Contributions are welcome! Feel free to open an issue or submit a pull request if you have a way to improve this project.
|
4 | 4 |
|
5 | 5 | Make sure your request is meaningful and you have tested the app locally before submitting a pull request.
|
6 | 6 |
|
| 7 | +This documentation contains a set of guidelines to help you during the contribution process. |
| 8 | + |
| 9 | +### Need some help regarding the basics? |
| 10 | + |
| 11 | +You can refer to the following articles on the basics of Git and GitHub in case you are stuck: |
| 12 | + |
| 13 | +- [Forking a Repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) |
| 14 | +- [Cloning a Repo](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request) |
| 15 | +- [How to create a Pull Request](https://opensource.com/article/19/7/create-pull-request-github) |
| 16 | +- [Getting started with Git and GitHub](https://towardsdatascience.com/getting-started-with-git-and-github-6fcd0f2d4ac6) |
| 17 | +- [Learn GitHub from Scratch](https://lab.github.com/githubtraining/introduction-to-github) |
7 | 18 |
|
8 | 19 | ### Installing Requirements
|
9 | 20 |
|
@@ -76,3 +87,94 @@ Run the following command to run the PHPUnit test script which will verify that
|
76 | 87 | ```bash
|
77 | 88 | composer test
|
78 | 89 | ```
|
| 90 | + |
| 91 | +## Submitting Contributions 👨💻 |
| 92 | + |
| 93 | +Below you will find the process and workflow used to review and merge your changes. |
| 94 | + |
| 95 | +### Step 0 : Find an issue |
| 96 | + |
| 97 | +- Take a look at the existing issues or create your **own** issues! |
| 98 | +- Wait for the issue to be assigned to you after which you can start working on it. |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +### Step 1 : Fork the Project |
| 104 | + |
| 105 | +- Fork this repository. This will create a copy of this repository on your GitHub profile. |
| 106 | +Keep a reference to the original project in the `upstream` remote. |
| 107 | + |
| 108 | +```bash |
| 109 | +git clone https://github.com/<your-username>/github-readme-streak-stats.git |
| 110 | +cd github-readme-streak-stats |
| 111 | +git remote add upstream https://github.com/DenverCoder1/github-readme-streak-stats.git |
| 112 | +``` |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +- If you have already forked the project, update your copy before working. |
| 118 | + |
| 119 | +```bash |
| 120 | +git remote update |
| 121 | +git checkout <branch-name> |
| 122 | +git rebase upstream/<branch-name> |
| 123 | +``` |
| 124 | + |
| 125 | +### Step 2 : Branch |
| 126 | + |
| 127 | +Create a new branch. Use its name to identify the issue your addressing. |
| 128 | + |
| 129 | +```bash |
| 130 | +# It will create a new branch with name Branch_Name and switch to that branch |
| 131 | +git checkout -b Branch_Name |
| 132 | +``` |
| 133 | + |
| 134 | +### Step 3 : Work on the issue assigned |
| 135 | + |
| 136 | +- Work on the issue(s) assigned to you. |
| 137 | +- Make all the necessary changes to the codebase. |
| 138 | +- After you've made changes or made your contribution to the project, add changes to the branch you've just created using: |
| 139 | + |
| 140 | +```bash |
| 141 | +# To add all new files to the branch |
| 142 | +git add . |
| 143 | + |
| 144 | +# To add only a few files to the branch |
| 145 | +git add <some files (with path)> |
| 146 | +``` |
| 147 | + |
| 148 | +### Step 4 : Commit |
| 149 | + |
| 150 | +- Commit a descriptive message using: |
| 151 | + |
| 152 | +```bash |
| 153 | +# This message will get associated with all files you have changed |
| 154 | +git commit -m "message" |
| 155 | +``` |
| 156 | + |
| 157 | +### Step 5 : Work Remotely |
| 158 | + |
| 159 | +- Now you are ready to your work on the remote repository. |
| 160 | +- When your work is ready and complies with the project conventions, upload your changes to your fork: |
| 161 | + |
| 162 | +```bash |
| 163 | +# To push your work to your remote repository |
| 164 | +git push -u origin Branch_Name |
| 165 | +``` |
| 166 | + |
| 167 | +- Here is how your branch will look. |
| 168 | + |
| 169 | + |
| 170 | +### Step 6 : Pull Request |
| 171 | + |
| 172 | +- Go to your forked repository in your browser and click on "Compare and pull request". Then add a title and description to your pull request that explains your contribution. |
| 173 | + |
| 174 | +<img width="700" alt="compare and pull request" src="https://user-images.githubusercontent.com/63443481/136186304-c0a767ea-1fd2-4b0c-b5a8-3e366ddc06a3.PNG"> |
| 175 | + |
| 176 | +<img width="882" alt="opening pull request" src="https://user-images.githubusercontent.com/63443481/136186322-bfd5f333-136a-4d2f-8891-e8f97c379ba8.PNG"> |
| 177 | + |
| 178 | +- Voila! Your Pull Request has been submitted and it's ready to be merged.🥳 |
| 179 | + |
| 180 | +#### Happy Contributing! |
0 commit comments