Skip to content

Commit c24da8d

Browse files
fix links class01
1 parent f586be5 commit c24da8d

File tree

2 files changed

+51
-41
lines changed

2 files changed

+51
-41
lines changed

class01/background_materials/git_adventure_guide.md

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@ git config --global user.email "you@example.com"
9292
## 🪄 Everyday Workflow
9393
0. **Initialize a new repository**
9494
If you’re starting a new project, create a new Git repository:
95-
```bash
96-
git init my-awesome-project
97-
cd my-awesome-project
98-
```
95+
96+
```bash
97+
git init my-awesome-project
98+
cd my-awesome-project
99+
```
99100

100101
> 🧩 *Puzzle*: What happens if you run `git init` in a directory that already has a `.git` folder?
101102
@@ -105,25 +106,28 @@ If you’re starting a new project, create a new Git repository:
105106
You can create a repository directly on GitHub or any other Git hosting service, which will give you a URL to clone it.
106107

107108
Once you have a remote repository, you can clone it to your local machine:
108-
```bash
109-
git clone <url>
110-
```
109+
110+
```bash
111+
git clone <url>
112+
```
111113
This process will also save the remote repository URL to a variable called `origin`, which is the default name for the remote repository. A repository remote is a version of your repository that is hosted on the internet or another network, allowing you to collaborate with others.
112114

113115
> 🧩 *Puzzle*: Can you have multiple remote copies' URLs stored in your local git configuration?
114116
115117
> 🏗️ *Quest Preparation*: Create a repository on Github. Then, since we started our repository locally, add the URL manually:
116-
```bash
117-
git remote add origin <url>
118-
```
118+
119+
```bash
120+
git remote add origin <url>
121+
```
119122

120123
2. **Hack away**
121124
Changes can be bundled or committed separately. Staging is the process of preparing files for a commit.
122125
You can stage specific files or all changes:
123-
```bash
124-
git add <files> # stage
125-
git commit -m "feat: add lunar lasers" # snapshot
126-
```
126+
127+
```bash
128+
git add <files> # stage
129+
git commit -m "feat: add lunar lasers" # snapshot
130+
```
127131

128132
Commits (versions) will store your changes with a message describing what you did.
129133

@@ -134,9 +138,9 @@ Commits (versions) will store your changes with a message describing what you di
134138
3. **Push** your masterpiece to the remote repository:
135139
In order to collaborate with others, you need to push your changes to the remote repository:
136140

137-
```bash
138-
git push origin main
139-
```
141+
```bash
142+
git push origin main
143+
```
140144

141145
> 🌟 *Pro‑tip*: Use `git add -p` to stage hunks interactively like a choose‑your‑own‑adventure book.
142146
@@ -189,17 +193,19 @@ git commit -m "fix: resolve cosmic cheese conflict"
189193
190194
2. **Clone** your fork.
191195
In order to work on your forked repository, you need to clone it to your local machine:
192-
```bash
193-
git clone <url-of-your-fork>
194-
cd <your-fork-directory>
195-
```
196+
197+
```bash
198+
git clone <url-of-your-fork>
199+
cd <your-fork-directory>
200+
```
196201
3. **Sync** with upstream.
197202
If the original repository has new changes, you can keep your fork up to date by syncing it with the upstream repository:
198-
```bash
199-
git remote add upstream <url-of-original>
200-
git fetch upstream
201-
git rebase upstream/main
202-
```
203+
204+
```bash
205+
git remote add upstream <url-of-original>
206+
git fetch upstream
207+
git rebase upstream/main
208+
```
203209
However, this is much easier on the GitHub website.
204210
- Go to your forked repository on GitHub and sync it with the original repository by clicking the "Sync fork" button.
205211

@@ -231,28 +237,32 @@ Git is a powerful tool, but sometimes you make mistakes. Here are some common sc
231237

232238
## 🛠️ Advanced Magic
233239
- **Stash spells**
234-
```bash
235-
git stash push -m "WIP dragon taming"
236-
git stash list
237-
git stash pop
238-
```
240+
241+
```bash
242+
git stash push -m "WIP dragon taming"
243+
git stash list
244+
git stash pop
245+
```
239246

240247
- **Bisect detective**
241-
```bash
242-
git bisect start
243-
git bisect bad # current commit is broken
244-
git bisect good v2.0.0 # last known good tag
245-
```
248+
249+
```bash
250+
git bisect start
251+
git bisect bad # current commit is broken
252+
git bisect good v2.0.0 # last known good tag
253+
```
246254
Git walks the commit tree to find the culprit!
247255

248256
- **Cherry‑pick delicacy**
249-
```bash
250-
git cherry-pick <hash>
251-
```
257+
258+
```bash
259+
git cherry-pick <hash>
260+
```
252261

253262
---
254263

255264
## 🧾 Cheat Sheet
265+
256266
```bash
257267
# add everything
258268
git add -A

class01/class01.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ julia> Pluto.run()
6767
To run a local notebook file that you have not opened before, then you need to enter its full path (e.g. `path/to/basics_math.jl`) into the blue box in the main menu.
6868

6969
### **Linear Algebra**:
70-
We have prepared a basic (Pluto) [Linear Algebra Primer](./background_materials/basics_math.jl) to help you brush up on essential concepts. This primer covers key topics such as matrix operations, eigenvalues, and eigenvectors besides other fundamental calculus concepts. It is recommended to review this primer before the first class.
70+
We have prepared a basic (Pluto) [Linear Algebra Primer](https://learningtooptimize.github.io/LearningToControlClass/dev/class01/background_materials/basics_math.html) to help you brush up on essential concepts. This primer covers key topics such as matrix operations, eigenvalues, and eigenvectors besides other fundamental calculus concepts. It is recommended to review this primer before the first class.
7171

7272
### **Optimization**:
7373
We will use JuMP for some optimization tasks. If you are new to JuMP, please review the [JuMP Tutorial](https://jump.dev/JuMP.jl/stable/tutorials/getting_started/getting_started_with_JuMP/) to familiarize yourself with its syntax and capabilities.
7474

75-
Test your knowledge with this (Pluto) [Modeling Exercise](./background_materials/optimization_homework.jl).
75+
Test your knowledge with this (Pluto) [Modeling Exercise](https://learningtooptimize.github.io/LearningToControlClass/dev/class01/background_materials/optimization_homework.html).

0 commit comments

Comments
 (0)