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: docs/labs/lab-01.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,45 @@ This lab walks you through setting up **Git** and **VS Code**, then using their
27
27
28
28
29
29
30
+
## Create a GitHub Account
31
+
32
+
**GitHub** is the online platform where we store and share all the code for this course. Before you can fork, clone, or push any code, you need your own free **GitHub** account.
33
+
34
+
<Badgetype="tip"text="Task" />
35
+
36
+
1. Open your browser and go to [https://github.com/signup](https://github.com/signup).
37
+
2. Enter your **email address**. Use an email you check regularly so you can verify your account.
38
+
3. Create a strong **password** and choose a **username**. This username is how others will see you on **GitHub**, so pick something clear and professional.
39
+
40
+
41
+
Once your account is created and verified, you are ready to continue.
42
+
43
+
## Preparing Your Workspace Folder
44
+
45
+
Before working with **GitHub**, you need a place on your computer to keep your work. Keeping everything in one organized folder makes your files easy to find later.
46
+
47
+
<Badgetype="tip"text="Task" />
48
+
49
+
First, create a folder named after yourself on your **Desktop**:
50
+
51
+
1. Go to your **Desktop**.
52
+
2. Right-click on an empty area and choose `New` → `Folder`.
53
+
3. Name the folder using your own name, for example `aiman-cp115`.
54
+
55
+
<br>
56
+
57
+
Now open that folder in **VS Code** so it becomes your working area:
58
+
59
+
1. Open **VS Code**.
60
+
2. From the top menu, click `File` → `Open Folder...`.
61
+
3. Browse to your **Desktop**, select the folder you just created, and click `Select Folder`.
62
+
63
+
::: tip
64
+
You can also open the folder directly by right-clicking it on the **Desktop** and choosing `Open with Code`.
65
+
:::
66
+
67
+
Once the folder is open, you will see its name at the top of the **Explorer** panel on the left side of **VS Code**. This is where your cloned repository will live.
68
+
30
69
## Install GitHub CLI
31
70
32
71
**GitHub CLI** (`gh`) is a command-line tool that brings **GitHub** directly into your terminal. In this course, we use it to authenticate your machine with **GitHub** so that pushing and pulling code works without entering your credentials every time.
@@ -113,6 +152,24 @@ Back in **VS Code**, choose `Source Control` from the sidebar and click `Clone r
### Cloning Using the Terminal <Badgetype="tip"text="Optional" />
156
+
157
+
Instead of the graphical `Source Control` panel, you can also clone the repository using the **terminal**. This is the method most programmers use, and it is good to get familiar with it.
158
+
159
+
Open a terminal in **VS Code** by clicking `Terminal` and then `New Terminal`. A terminal will appear at the bottom of the window, already pointing at your workspace folder.
160
+
161
+
In the terminal, type the command below, replacing the link with the one you copied from the `Code` button on **GitHub**:
Press `Enter`, and **Git** will download a full copy of the repository into a new folder inside your workspace.
168
+
169
+
::: tip
170
+
Both methods do the same thing. The `Source Control` panel runs the `git clone` command for you behind the scenes.
171
+
:::
172
+
116
173
After finishing that, your local copy is ready to use. If you have completed the **GitHub CLI** setup earlier, your machine is already authenticated and you are good to go.
0 commit comments