Skip to content

Commit 8c7a16b

Browse files
authored
restructure instructions for working locally (#1906)
1 parent 7232662 commit 8c7a16b

2 files changed

Lines changed: 31 additions & 30 deletions

File tree

  • common-content/en/module/induction/working-locally
  • common-theme/assets/styles/04-components

common-content/en/module/induction/working-locally/index.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,53 @@ time ="20"
1212

1313
+++
1414

15-
Here is a diagram representing how the repositories interact after forking and cloning:
15+
GitHub is an really useful tool for aiding collaboration, but when it comes to writing and updating the code for a project, we tend to want the flexibility that comes with working on our {{<tooltip title="local machines">}}A **machine** in this context is any computer, and your **local machine** is the computer (laptop or desktop) on which you do your work.{{</tooltip>}}. So we need to address the following question:
16+
17+
> How can we get a copy of an existing GitHub repository on our local machine?
18+
19+
In other words, we need to get a {{<tooltip title="local copy">}}A repository on GitHub is said to be **remote**. A repository on our own computer is said to be **local**.{{</tooltip>}} of the repository which is on GitHub.
20+
21+
We call a local copy of a GitHub repository a **clone**. The process of copying a remote repository on to a local machine is called **cloning**. Watch the video below to see instructions on one of the ways you can clone a repo: using the Visual Studio Code interface.
22+
23+
{{<youtube>}}https://www.youtube.com/watch?v=ILJ4dfOL7zs{{</youtube>}}
24+
25+
{{<note type="exercise" title="Exercise">}}
26+
27+
##### 🐑 Clone a Repo
28+
29+
Follow the steps in the above video to make a local copy of the education blog repo that you forked in the previous step.
30+
31+
##### Reminders:
32+
33+
- Use the URL for **your fork** of the `education-blog` repo when you are cloning, not the URL for the original CYF repo
34+
- When selecting the location to clone your files, choose the `CYF` folder you created in an earlier task
35+
- If you are working on a library computer, you won't be able to clone the repo so come to class to try cloning out. In the meantime, you can explore the files using dot dev in the same way as you would in Visual Studio Code
36+
37+
{{</note>}}
38+
39+
For a visual reference, here is a diagram representing how the repositories interact after forking and cloning:
1640

1741
```mermaid
1842
flowchart TD
1943
subgraph Remote["Remote (GitHub)"]
2044
A["CodeYourFuture/education-blog"] -->|fork| B["EagerLearner/education-blog"]
2145
end
22-
46+
2347
B -->|clone| C
24-
48+
2549
subgraph Local["Local (your computer)"]
2650
C["YOUR_CYF_FOLDER/education-blog"]
2751
end
28-
52+
2953
%% Style definitions
3054
classDef container stroke-dasharray:5 5,fill:#f8f9fa,stroke:#495057
3155
classDef rounded rx:10,ry:10,fill:#e9ecef,stroke:#495057
3256
classDef arrow color:#0d6efd,stroke-width:2px
33-
57+
3458
%% Apply styles
3559
class Remote,Local container
3660
class A,B,C rounded
3761
linkStyle 0,1 stroke:#0d6efd,stroke-width:2px
3862
```
3963

40-
Sketch this diagram in your notebook. When you inevitably get mixed lost about where your changes are, you can refer back to this diagram to help you understand what's happening.
41-
42-
> [!NOTE]
43-
> If you're working on a library computer, just fork the repo to your own GitHub account. You can't clone a repo on a library computer, so come to class to try cloning out. You can explore the files using dot dev in the same way as you would in Visual Studio Code.
44-
45-
We can also use Git on our local machine to perform similar tasks as we do on GitHub. So we need to address the following question:
46-
47-
> How can we get a copy of an existing GitHub repository on our local machine?
48-
49-
In other words, we need to get a {{<tooltip title="local copy">}}A repository on GitHub is said to be **remote**. A repository on our own computer is said to be **local**.{{</tooltip>}} of the repository which is on GitHub.
50-
51-
We call a local copy of a GitHub repository a **clone**. The process of copying a remote repository on to a local machine is called **cloning**.
52-
53-
### 🎯 Goal: Clone a remote repository to your local machine
54-
55-
You'll need to clone **your fork** of the education blog repo. Follow through the steps in the video "How to clone a repository from GitHub to Visual Studio Code".
56-
57-
{{<youtube>}}https://www.youtube.com/watch?v=ILJ4dfOL7zs{{</youtube>}}
58-
59-
<hr>
60-
61-
##### 🎗️ Reminder:
62-
63-
- Use the URL for your fork of the `education-blog` repo when you are cloning
64-
- When selecting the location to clone your files, choose the `CYF` folder you created in the [module prep](/user-data/prep/#create-cyf-folder)
64+
Sketch this diagram in your notebook. When you inevitably get mixed up or lost about where your changes are, you can refer back to this diagram to help you understand what's happening.

common-theme/assets/styles/04-components/block.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ ul.c-block, ol.c-block, li.c-block {
5050
padding: 0;
5151
border: 0;
5252
box-shadow: none;
53+
margin: var(--theme-spacing--2) 0;
5354
}
5455

5556
&--pullreq {

0 commit comments

Comments
 (0)