Skip to content

Commit dd475de

Browse files
style: remove fancy quotes and add shell prompt
PR-URL: #6412 Reviewed-by: Athan Reines <[email protected]>
1 parent 6c34fb7 commit dd475de

File tree

3 files changed

+54
-54
lines changed

3 files changed

+54
-54
lines changed

docs/contributing/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ limitations under the License.
4646

4747
## Introduction
4848

49-
We appreciate your interest in contributing to stdlib! Below, weve compiled answers to some frequently asked questions (FAQs) from first-time contributors. If youre new to the project or encounter any challenges, this guide is a great place to start.
49+
We appreciate your interest in contributing to stdlib! Below, we've compiled answers to some frequently asked questions (FAQs) from first-time contributors. If you're new to the project or encounter any challenges, this guide is a great place to start.
5050

5151
<a name="first-time-contributor"></a>
5252

docs/contributing/git_cheatsheet.md

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Before you start using [Git][git], it's important to introduce yourself. This st
3333
<!-- run-disable -->
3434

3535
```bash
36-
git config --global user.name "Your Name"
37-
git config --global user.email "[email protected]"
36+
$ git config --global user.name "Your Name"
37+
$ git config --global user.email "[email protected]"
3838
```
3939

4040
> You only need to do this once.
@@ -44,8 +44,8 @@ To confirm that your identity is set correctly, run:
4444
<!-- run-disable -->
4545

4646
```bash
47-
git config --global user.name
48-
git config --global user.email
47+
$ git config --global user.name
48+
$ git config --global user.email
4949
```
5050

5151
This should display the name and email you configured. If there's a mistake, simply re-run the configuration commands with the correct details.
@@ -59,17 +59,17 @@ Once you've forked the repository, clone your fork onto your local machine:
5959
<!-- run-disable -->
6060

6161
```bash
62-
git clone https://github.com/YOUR_GITHUB_USERNAME/stdlib.git
63-
cd stdlib
62+
$ git clone https://github.com/YOUR_GITHUB_USERNAME/stdlib.git
63+
$ cd stdlib
6464
```
6565

6666
Since the official `stdlib` repository keeps updating, link it as the [upstream][git-remotes] remote to fetch the latest changes:
6767

6868
<!-- run-disable -->
6969

7070
```bash
71-
git remote add upstream https://github.com/stdlib-js/stdlib.git
72-
git fetch upstream
71+
$ git remote add upstream https://github.com/stdlib-js/stdlib.git
72+
$ git fetch upstream
7373
```
7474

7575
> In [Git][git], a [remote][github-remote] is a reference to a repository. Your fork is called `origin`, while the official `stdlib` repository is referred to as `upstream`. Adding an [upstream][git-remotes] remote allows you to consistently fetch the latest updates from the original repository and incorporate them into your work.
@@ -81,47 +81,47 @@ In `stdlib`, the `develop` branch is the primary branch for development. Instead
8181
<!-- run-disable -->
8282

8383
```bash
84-
git checkout -b feature/my-new-feature
84+
$ git checkout -b feature/my-new-feature
8585
```
8686

8787
## Changes
8888

89-
Now comes the fun part of actually writing code! After making your changes, it's always good to check whats modified:
89+
Now comes the fun part of actually writing code! After making your changes, it's always good to check what's modified:
9090

9191
<!-- run-disable -->
9292

9393
```bash
94-
git status
94+
$ git status
9595
```
9696

9797
Once you're happy with your changes, add them to the staging area for a final confirmation:
9898

9999
<!-- run-disable -->
100100

101101
```bash
102-
git add <file1> <file2> # Add specific files
103-
git add . # Add all changes
102+
$ git add <file1> <file2> # Add specific files
103+
$ git add . # Add all changes
104104
```
105105

106106
Then, commit with a meaningful message:
107107

108108
<!-- run-disable -->
109109

110110
```bash
111-
git commit -m "feat: add support for new function"
111+
$ git commit -m "feat: add support for new function"
112112
```
113113

114114
For **multi-line** commit messages (like when you want to include a longer description), you can use:
115115

116116
<!-- run-disable -->
117117

118118
```bash
119-
git commit
119+
$ git commit
120120
```
121121

122122
This opens an editor where you can write something like:
123123

124-
```bash
124+
```plaintext
125125
feat: add support for new function
126126
127127
This adds the initial version of <function_name>, with support for <brief explanation>.
@@ -140,7 +140,7 @@ To make this even easier, you can also use:
140140
<!-- run-disable -->
141141

142142
```bash
143-
make commit
143+
$ make commit
144144
```
145145

146146
This gives you an interactive prompt to help you craft a properly formatted commit message. Super handy!
@@ -154,15 +154,15 @@ Once your branch is ready, you need to push your **local** changes to your forke
154154
<!-- run-disable -->
155155

156156
```bash
157-
git push
157+
$ git push
158158
```
159159

160-
If this is the first time youre pushing the branch, [Git][git] may prompt you to set an [upstream][git-remotes] branch. You can do this manually by running:
160+
If this is the first time you're pushing the branch, [Git][git] may prompt you to set an [upstream][git-remotes] branch. You can do this manually by running:
161161

162162
<!-- run-disable -->
163163

164164
```bash
165-
git push --set-upstream origin feature/my-new-feature
165+
$ git push --set-upstream origin feature/my-new-feature
166166
```
167167

168168
> **Note:** This is a **one-time setup** for this branch. After this, you can simply use `git push` for future updates.
@@ -188,8 +188,8 @@ To update your local `develop` branch while making sure there are no unwanted ch
188188
<!-- run-disable -->
189189

190190
```bash
191-
git checkout develop
192-
git pull --ff-only upstream develop
191+
$ git checkout develop
192+
$ git pull --ff-only upstream develop
193193
```
194194

195195
> **Why use `--ff-only`?** This ensures your branch updates **only if no merge commits are needed**. If your `develop` branch has unexpected changes, this command will fail, alerting you that something is wrong.
@@ -199,8 +199,8 @@ If the above pull fails because you accidentally made changes to `develop`, you
199199
<!-- run-disable -->
200200

201201
```bash
202-
git checkout develop
203-
git reset --hard upstream/develop
202+
$ git checkout develop
203+
$ git reset --hard upstream/develop
204204
```
205205

206206
> **Warning:** This will delete any changes you made to `develop`. Make sure you don't have important work in this branch before running this command.
@@ -210,7 +210,7 @@ After updating `develop`, you can push it to your fork to keep everything in syn
210210
<!-- run-disable -->
211211

212212
```bash
213-
git push origin develop
213+
$ git push origin develop
214214
```
215215

216216
## Integration
@@ -226,17 +226,17 @@ Rebasing **moves** your commits on top of the latest `develop`, as if you had st
226226
<!-- run-disable -->
227227

228228
```bash
229-
git checkout feature/my-branch
230-
git rebase develop
229+
$ git checkout feature/my-branch
230+
$ git rebase develop
231231
```
232232

233233
If there are conflicts, resolve them and continue:
234234

235235
<!-- run-disable -->
236236

237237
```bash
238-
git add <resolved-file>
239-
git rebase --continue
238+
$ git add <resolved-file>
239+
$ git rebase --continue
240240
```
241241

242242
#### Example: How Rebase Works
@@ -266,16 +266,16 @@ Merging **combines** your feature branch with `develop`, keeping both histories
266266
<!-- run-disable -->
267267

268268
```bash
269-
git checkout feature/my-branch
270-
git merge develop
269+
$ git checkout feature/my-branch
270+
$ git merge develop
271271
```
272272

273273
If there are conflicts, resolve them, then commit the merge. Finally, push the updated branch:
274274

275275
<!-- run-disable -->
276276

277277
```bash
278-
git push origin feature/my-branch
278+
$ git push origin feature/my-branch
279279
```
280280

281281
> Alternatively, if you have a running PR and want to update that branch directly to the `stdlib` develop branch, comment `/stdlib merge` on the PR, wait for the bot to merge your branch automatically, and then run `git pull`.
@@ -307,7 +307,7 @@ Use **Rebase** if:
307307

308308
Use **Merge** if:
309309

310-
- You want a safer approach that doesnt rewrite history.
310+
- You want a safer approach that doesn't rewrite history.
311311
- You are unsure about rebase or are collaborating on the branch.
312312

313313
> **When in doubt, use merge.** It is safer and avoids potential conflicts caused by rewriting history. If you use the GitHub UI to update your branches, it also performs a merge.
@@ -354,16 +354,16 @@ We will consider the conflict in the `isEven` function above. Let's say you want
354354
<!-- run-disable -->
355355
356356
```bash
357-
git add <file>
357+
$ git add <file>
358358
```
359359
360360
- Continue the rebase or merge:
361361
362362
<!-- run-disable -->
363363
364364
```bash
365-
git rebase --continue # If rebasing
366-
git merge --continue # If merging
365+
$ git rebase --continue # If rebasing
366+
$ git merge --continue # If merging
367367
```
368368
369369
> **Tip:** Many editors like VS Code highlight conflicts and even give you buttons to accept incoming or current changes. This can make resolving conflicts much easier.
@@ -383,17 +383,17 @@ Assuming you've already cloned the repository and set up your identity:
383383
<!-- run-disable -->
384384
385385
```bash
386-
git checkout develop
387-
git pull --ff-only upstream develop
388-
git push origin develop # Optional: Update your fork
386+
$ git checkout develop
387+
$ git pull --ff-only upstream develop
388+
$ git push origin develop # Optional: Update your fork
389389
```
390390
391391
2. **Create a new branch**:
392392
393393
<!-- run-disable -->
394394
395395
```bash
396-
git checkout -b feature/is-even
396+
$ git checkout -b feature/is-even
397397
```
398398
399399
3. **Make changes**: This could involve adding the new function, writing tests, benchmarks, examples, updating documentation, etc.
@@ -403,17 +403,17 @@ Assuming you've already cloned the repository and set up your identity:
403403
<!-- run-disable -->
404404
405405
```bash
406-
git status # Optional: Check what's modified
407-
git add .
408-
git commit -m "feat: add isEven function"
406+
$ git status # Optional: Check what's modified
407+
$ git add .
408+
$ git commit -m "feat: add isEven function"
409409
```
410410
411411
If you prefer a multi-line commit message, use:
412412
413413
<!-- run-disable -->
414414
415415
```bash
416-
git commit
416+
$ git commit
417417
```
418418
419419
Then write your message like:
@@ -431,7 +431,7 @@ Assuming you've already cloned the repository and set up your identity:
431431
<!-- run-disable -->
432432
433433
```bash
434-
git push --set-upstream origin feature/is-even
434+
$ git push --set-upstream origin feature/is-even
435435
```
436436
437437
> **Note:** As mentioned earlier, this is a one-time setup for this branch. After this, you can simply use `git push` for future updates.
@@ -443,34 +443,34 @@ Assuming you've already cloned the repository and set up your identity:
443443
<!-- run-disable -->
444444
445445
```bash
446-
git pull origin feature/is-even # git pull also works
446+
$ git pull origin feature/is-even # git pull also works
447447
```
448448
449449
Additionally, if new changes are added to the [upstream][git-remotes] `develop` branch, you can integrate them into your feature branch using rebase or merge:
450450
451451
<!-- run-disable -->
452452
453453
```bash
454-
git checkout develop
455-
git pull --ff-only upstream develop # Update local develop first
456-
git checkout feature/is-even
457-
git rebase develop # or git merge develop
454+
$ git checkout develop
455+
$ git pull --ff-only upstream develop # Update local develop first
456+
$ git checkout feature/is-even
457+
$ git rebase develop # or git merge develop
458458
```
459459
460460
Resolve any conflicts with the steps mentioned earlier, then continue the rebase:
461461
462462
<!-- run-disable -->
463463
464464
```bash
465-
git rebase --continue
465+
$ git rebase --continue
466466
```
467467
468468
Finally, push your changes:
469469
470470
<!-- run-disable -->
471471
472472
```bash
473-
git push --force # Force push after rebasing
473+
$ git push --force # Force push after rebasing
474474
```
475475
476476
> **Note:** Force pushing is required after rebasing because it rewrites history. This is safe as long as you're the only one working on the branch. If you want to avoid force pushing, use merge instead of rebase.

docs/contributing/setting_up_a_devcontainer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Setting up the stdlib dev container **requires** the following prerequisites:
4242

4343
### Download
4444

45-
To acquire the source code, first navigate to the parent directory where you want to place the projects [Git][git] repository.
45+
To acquire the source code, first navigate to the parent directory where you want to place the project's [Git][git] repository.
4646

4747
<!-- run-disable -->
4848

0 commit comments

Comments
 (0)