Skip to content

Commit f8140b9

Browse files
committed
fix: remove trailing white space
1 parent 5882bc6 commit f8140b9

File tree

10 files changed

+596
-606
lines changed

10 files changed

+596
-606
lines changed

contribute-open-source/clone-repo.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,82 +17,80 @@ myst_html_meta:
1717
---
1818

1919
(clone-repository)=
20-
# Clone a GitHub Repository to Work Locally
21-
How to clone a repo.
20+
21+
# Clone a GitHub Repository to Work Locally
22+
23+
How to clone a repo.
2224

2325
## Clone a repo: copy files From GitHub.com to your computer
2426

2527
To work locally with a **GitHub** repository (including forked repos), you must create a local copy of that repository on your computer (a task referred to as `cloning` a repo). You can clone **GitHub** repositories that you own or that are owned by others (e.g., repositories that you have forked to your **GitHub** account).
2628

27-
In either case, cloning allows you to create a local copy of a **GitHub** repository to work with the files locally on your computer. Cloning a repository to your computer is a great way to work on your files locally while still having a copy of your files on the cloud on **GitHub.com**. Following the steps below, you will use the `git clone` command in the **terminal** to clone **GitHub** repositories.
28-
29+
In either case, cloning allows you to create a local copy of a **GitHub** repository to work with the files locally on your computer. Cloning a repository to your computer is a great way to work on your files locally while still having a copy of your files on the cloud on **GitHub.com**. Following the steps below, you will use the `git clone` command in the **terminal** to clone **GitHub** repositories.
2930

3031
### Use `Bash` to Change to Your Desired Working Directory
3132

3233
The first step to using any **git** command is changing the current working directory to your desired one.
33-
In the case of `git clone`, the current working directory needs to be where you want to download a local copy of a **GitHub** repository.
34-
35-
For this lesson, you will clone a repo locally on your computer (or wherever you work).
34+
In the case of `git clone`, the current working directory needs to be where you want to download a local copy of a **GitHub** repository.
3635

36+
For this lesson, you will clone a repo locally on your computer (or wherever you work).
3737

3838
### Copy a Github.com Repository URL From GitHub.com
3939

40-
To run the `git clone` command, you need the URL for the repository you want to clone (i.e., either a repository owned by you or a fork you created from another user's repository).
40+
To run the `git clone` command, you need the URL for the repository you want to clone (i.e., either a repository owned by you or a fork you created from another user's repository).
4141

42-
On the main **GitHub.com** page of the repository, you can click on the green button for `Clone or download`, and copy the URL provided in the box, which will look like this:
42+
On the main **GitHub.com** page of the repository, you can click on the green button for `Clone or download`, and copy the URL provided in the box, which will look like this:
4343

4444
`https://github.com/your-username/repo-name`
4545

4646
::::{todo}
4747
:::{figure} /images/github/image-coming-soon.png
4848
:alt: alt text here
4949

50-
You can make a local copy of your forked repository on your computer with the git clone command.
50+
You can make a local copy of your forked repository on your computer with the git clone command.
5151
:::
5252
::::
5353

54-
:::{tip}
55-
You can copy the URL directly from your web browser, or in some cases, you might already know the URL. However, in many cases, you will come across a new **GitHub.com** repository on your own and will need to follow these instructions to copy the URL for future use.
54+
:::{tip}
55+
You can copy the URL directly from your web browser, or in some cases, you might already know the URL. However, in many cases, you will come across a new **GitHub.com** repository on your own and will need to follow these instructions to copy the URL for future use.
5656
:::
5757

5858
### Run the `git clone` in the shell
5959

60-
Now that you have the URL for a repository that you want to copy locally, you can use the **terminal** to run the `git clone` command followed by the URL that you copied:
60+
Now that you have the URL for a repository that you want to copy locally, you can use the **terminal** to run the `git clone` command followed by the URL that you copied:
6161

6262
```bash
6363
git clone https://github.com/your-username/repo-name
6464
```
6565

66-
You have now made a local copy of a repository. You can double-check that the directory exists using the `ls` command in the **terminal**.
66+
You have now made a local copy of a repository. You can double-check that the directory exists using the `ls` command in the **terminal**.
6767

6868
```bash
69-
$ ls
69+
$ ls
7070
repo-name
7171
```
7272

73-
7473
:::{admonition} <i class="fa fa-pencil-square-o" aria-hidden="true"></i> Challenge - Fork and Clone a Repository
7574

7675
Go to GitHub.com and login. Then use the link below to open the **repo-name** repo.
7776

7877
`https://github.com/pyopensci/repo-name`
7978

8079
* On the main **GitHub.com** page of this repository, you will see a button on the top right that says `Fork`. The number next to `Fork` tells the number of times that the repository has been copied or forked.
81-
* Click on the `Fork` button and select your **GitHub.com** account as the home of the forked repository.
80+
* Click on the `Fork` button and select your **GitHub.com** account as the home of the forked repository.
8281
* Once you have forked a repository, you will have a copy (or a fork) of that repository in your **GitHub** account. The URL to your fork will contain your username:
8382

8483
`https://github.com/your-username/repo-name`
8584

86-
* Finally, clone the fork that you created above so you have a copy of all the files on github.com on your local computer.
85+
* Finally, clone the fork that you created above so you have a copy of all the files on github.com on your local computer.
8786

88-
To make sure you did things right, in bash, cd to the repo-name directory on your computer.
87+
To make sure you did things right, in bash, cd to the repo-name directory on your computer.
8988
Type:
9089

91-
`$ git remote -v`
90+
`$ git remote -v`
9291

9392
The paths returned should look something like this:
9493

9594
`https://github.com/your-username/repo-name`
9695

97-
9896
:::

contribute-open-source/edit-commit-files.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,46 +19,47 @@ og:image:alt: An image that shows the steps for contributing to open source on G
1919
---
2020

2121
(pyos-edit-commit-files)=
22+
2223
# Your First Edits to a File in Your Fork: Edit & Commit
2324

24-
> In this lesson, you’ll learn how to:
25+
> In this lesson, you’ll learn how to:
2526
> <i class="fa-solid fa-circle-check" style="color: #81c0aa;"></i>edit a file directly in your **fork** using GitHub’s interface and commit the changes using only the native GitHub interface
2627
>
2728
> If you want to work on the files locally on your laptop, you will need to [clone or make a copy of your repo locally](clone-repo).
2829
29-
Now that you've [identified and commented on an issue](identify-github-issue), [forked the repository](fork-repo), and received approval to work on an issue, it's time to make your changes.
30+
Now that you've [identified and commented on an issue](identify-github-issue), [forked the repository](fork-repo), and received approval to work on an issue, it's time to make your changes.
3031

3132
:::{tip}
32-
💡 Your fix should be **small and text-based**, like updating documentation or fixing a typo.
33+
💡 Your fix should be **small and text-based**, like updating documentation or fixing a typo.
3334
:::
3435

35-
## How to edit a file in your fork
36+
## How to edit a file in your fork
3637

37-
GitHub lets you edit files right in your browser. Here’s how:
38+
GitHub lets you edit files right in your browser. Here’s how:
3839

39-
1. Navigate to **your fork** of the repository.
40-
2. Find the file you want to edit.
41-
3. Click the <kbd><i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> Edit</kbd> button.
40+
1. Navigate to **your fork** of the repository.
41+
2. Find the file you want to edit.
42+
3. Click the <kbd><i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> Edit</kbd> button.
4243
4. Make your changes and **commit** them.
4344

4445
:::{figure} /images/github/edit-commit-file.gif
45-
:alt: "GIF showing how to edit and commit a file on GitHub."
46+
:alt: "GIF showing how to edit and commit a file on GitHub."
4647

4748
Editing a file directly in the GitHub interface is a straight forward process.
4849
:::
4950

50-
> **⚡ Quick tip:** You can edit as many files as you want, but GitHub only lets you commit them **one at a time** in the browser.
51+
> **⚡ Quick tip:** You can edit as many files as you want, but GitHub only lets you commit them **one at a time** in the browser.
5152
52-
## Ways to edit a file: GitHub vs. GitHub Codespaces
53+
## Ways to edit a file: GitHub vs. GitHub Codespaces
5354

5455
GitHub now offers **two ways** to edit files directly in the interface or using the [cloud-based GitHub Codespaces](about-codespace). If you’re making a small change, use GitHub’s interface. If you need to edit multiple files, try Codespaces.
5556

56-
| | Option | When to Use | Pros | Limitations |
57-
|-|---------|------------|------|-------------|
58-
| | **GitHub Interface** <i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> | Quick edits (typos, small fixes) | No setup needed, edit in browser | Can only commit one file at a time |
59-
| | **GitHub Codespaces** <i class="fa-solid fa-laptop-code" style="color: #81c0aa;"></i> | Editing multiple files | Full VS Code environment in browser | Requires configuration but once configured, you can reuse it |
57+
| | Option | When to Use | Pros | Limitations |
58+
|-|---------|------------|------|-------------|
59+
| | **GitHub Interface** <i class="fa-solid fa-pencil" style="color: #81c0aa;"></i> | Quick edits (typos, small fixes) | No setup needed, edit in browser | Can only commit one file at a time |
60+
| | **GitHub Codespaces** <i class="fa-solid fa-laptop-code" style="color: #81c0aa;"></i> | Editing multiple files | Full VS Code environment in browser | Requires configuration but once configured, you can reuse it |
6061

61-
> **💡 Need to edit multiple files using a coding editor like VsCode or Jupyter?** Learn more about using [GitHub Codespaces](github-codespaces).
62+
> **💡 Need to edit multiple files using a coding editor like VsCode or Jupyter?** Learn more about using [GitHub Codespaces](github-codespaces).
6263
6364
## What is a commit?
6465

@@ -85,11 +86,10 @@ Each commit represents **a set of changes** at a specific time.
8586
You can always **undo or revert** changes using Git.
8687
:::
8788

88-
:::{admonition} What's next?
89-
:class: seealso
89+
:::{admonition} What's next?
90+
:class: seealso
9091

91-
Once you've committed your changes, you can open a **<i class="fa-brands fa-github-alt"></i> pull request (PR)** to suggest your edits to the main project.
92+
Once you've committed your changes, you can open a **<i class="fa-brands fa-github-alt"></i> pull request (PR)** to suggest your edits to the main project.
9293

93-
[<i class="fa-solid fa-circle-check" style="color: #81c0aa;"></i> Learn how to create a pull request →](pyos-pull-request)
94+
[<i class="fa-solid fa-circle-check" style="color: #81c0aa;"></i> Learn how to create a pull request →](pyos-pull-request)
9495
:::
95-

0 commit comments

Comments
 (0)