You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 05-how-to-contribute-to-open-source.md
+12-83
Original file line number
Diff line number
Diff line change
@@ -144,106 +144,35 @@ You'll need to have these tools donwloaded and installed on your local machine:
144
144
3. Clone your forked repository to your computer.
145
145
4. Run `npm install` to install the dependencies.
146
146
5. Create a new branch and use a descriptive name related to your contribution — for example, `feat/add-alice`.
147
-
6.Add yourself to the guestbook.
147
+
6.Run `npm run contributors: add` in your terminal.
148
148
149
-
There are two ways you can complete this activity:
150
-
151
-
- Using the CLI tool.
152
-
- Manually editing the `.all-contributorsrc` file.
153
-
154
-
Although adding yourself to the guestbook with the CLI tool is simpler, we recommend manually editing the file to get more experience adding and committing your changes, creating pull requests, and pull request reviews. Below, you'll find the directions for each method:
155
-
156
-
**CLI Tool**
157
-
158
-
- Run `npm run contributors:add` in your terminal.
159
-
160
-
Follow the instructions to add yourself to the guestbook. After you finish and click enter, you must click enter again to confirm your choices.
161
-
162
-
**Manual Addition**
163
-
164
-
- Open the `.all-contributorsrc` file.
165
-
- Go to the last contributor in the contributors' array.
166
-
- Add a comma after the last closing curly bracket ( `},` ).
167
-
- Copy and paste the template below:
168
-
169
-
```javascript
170
-
{
171
-
"login":"",
172
-
"name":"",
173
-
"avatar_url":"",
174
-
"profile":"",
175
-
"contributions": []
176
-
}
177
-
```
178
-
179
-
- Add yourself manually to the guestbook by updating this information:
180
-
181
-
-**login**: Your GitHub's username.
182
-
- **name**: Your name.
183
-
- **avatar_url**: URL to your avatar on GitHub.
184
-
185
-
In your browser, copy and paste the link of your GitHub profile, append `.png` at the end (for example, `https://github.com/USER_NAME.png`), and click enter. Copy and paste the link here.
186
-
187
-
- **profile**: Link to your website (if you include it in your GitHub profile) **or** your GitHub profile.
188
-
- **contribution**: Type of your contributions.
189
-
190
-
Refer to the types (in the first column) in this [emoji key and contribution types](https://allcontributors.org/docs/en/emoji-key) to fill in the values.
191
-
192
-
> ⚠️ **You have to strictly use the types in the list to avoid breaking the whole project.**
> ⚠️ **Remember to add a comma after the quotes, except for the last one in the array and the last closing curly bracket.**
149
+
Follow the instructions to add yourself to the guestbook. After you finish and click enter, you must click enter again to confirm your choices.
211
150
212
151
7. Run `npm run contributors:generate` in your terminal to generate the guestbook on the README.
213
152
8. Copy and paste the Markdown of the README in [Markdown Live Preview](https://markdownlivepreview.com/) and take a screenshot of your profile being generated. You will need this later when creating a pull request.
214
153
215
-
> **Tip**: If you don't see your profile in the "Contributors" section, zoom out the screen until you can see it before taking a screenshot.
154
+
!> If you don't see your profile in the "Contributors" section, zoom out the screen until you can see it before taking a screenshot.
216
155
217
-
9.If you used the CLI tool method in step 5 to add yourself to the guestbook, **skip this step**. Otherwise:
156
+
9.Run `git log` to check if your changes have been automatically committed. To close the log, press `Q`.
218
157
219
-
Add and commit your changes by running the following command:
220
-
221
-
```bash
222
-
git commit -am "Your commit message"
223
-
```
224
-
225
-
Replace `"Your commit message"` to your own message. For example, `"Add Alice as a contributor"`.
226
-
227
-
>**Note**: Unlike the `git add .` and `git commit -m "Your message"` approach, in the `git commit -am` command, adding `-a` flag to `git commit` skips the staging process. The`-a` flag automatically stages all your changes in _committed_ files. Combining it with the `-m` flag allows you to write the commit message.
228
-
229
-
10. Run `git log` to check if you have committed your changes. Press`Q` to close the log.
230
-
231
-
If you add yourself using the CLI tool, it automatically adds and commits your changes. So you will see this automated commit message:
158
+
Here's what you should expect to see as your commit message:
232
159
233
160
```bash
234
161
docs: add @your_username as a contributor
235
162
```
236
163
237
-
11. Push the commit to your forked repository withthis command:
164
+
10. Push the commit to your forked repository with this command:
238
165
239
-
```bash
240
-
git push -u origin branch-name
241
-
```
166
+
```bash
167
+
git push -u origin branch-name
168
+
```
242
169
243
-
12. Go to your forked repository on GitHub and create a pull request with the title `feat: Add <@github-username> as a contributor`.
170
+
11. Go to your forked repository on GitHub and create a pull request with the title `feat: Add <@github-username> as a contributor`.
244
171
245
172
Congratulations on your first contribution! 🎉
246
173
174
+
?> If you're ready for your next contribution, head on over to the [pizza-verse repo](https://github.com/open-sauced/pizza-verse) and follow the contribution guidelines for your next contribution. Once you're done, head on over to [chapter 6](06-the-secret-sauce.md) in this course.
175
+
247
176
## Keeping Branches Up to Date
248
177
249
178
It is highly recommended that you update your remote and local branches habitually. That way, your branch will have the latest update when merged into the `main` branch of the original (`upstream`) repository.
0 commit comments