|
1 | 1 | # Committing changes |
2 | 2 |
|
3 | | -The first and most basic task to do in Git is *record changes* using |
| 3 | +The first and most basic task to do in Git is **record changes** using |
4 | 4 | commits. In this part, we will record changes in two |
5 | 5 | ways: on a new branch (which supports multiple lines of work at once), and directly |
6 | 6 | on the "main" branch (which happens to be the default branch here). |
@@ -40,8 +40,9 @@ can merge them together easily. Image created using <https://gopherize.me/> |
40 | 40 |
|
41 | 41 | We offer **three different paths** of how to do this exercise. For |
42 | 42 | the CodeRefinery workshop day 1, we use and demonstrate the **GitHub |
43 | | -path** only and recommend you do that. (You can get experience with |
44 | | -the other paths on day 2) |
| 43 | +path** only and recommend you do that |
| 44 | +(you can get experience with |
| 45 | +the other paths on day 2). |
45 | 46 |
|
46 | 47 | :::{exercise} Exercise: Practice creating commits and branches (20 min) |
47 | 48 | 1. Make sure that you now work **on your fork** of the recipe-book |
@@ -112,7 +113,7 @@ name of the thing you make. A commit is identified by something such as |
112 | 113 | :width: 60% |
113 | 114 | :class: with-border |
114 | 115 | ::: |
115 | | -1. Change to some sub-directory, for example `sides` |
| 116 | +1. Change to some sub-directory, for example `sides`. |
116 | 117 | 1. Make sure you are still on the `new-recipe` branch (it should say |
117 | 118 | it at the top), and click "Add file" → "Create new file" from the |
118 | 119 | upper right. |
@@ -316,13 +317,9 @@ it makes sense later on. |
316 | 317 | :::::{tabs} |
317 | 318 |
|
318 | 319 | ::::{group-tab} GitHub |
319 | | -Next to the branch name switcher, click on "Branches" to get an overview. |
320 | | - |
321 | | -Another way to compare branches or commits on GitHub is to adjust the following URL: |
322 | | -`https://github.com/USER/recipe-book/compare/VERSION1..VERSION2` |
323 | | - |
324 | | -Replace `USER` with your username and `VERSION1` and `VERSION2` with a commit hash or branch name. |
325 | | -Please try it out. |
| 320 | +A nice way to compare braches is to add `/compare` to the URL of the repository, |
| 321 | +for example (replace USER): |
| 322 | +`https://github.com/USER/recipe-book/compare` |
326 | 323 | :::: |
327 | 324 |
|
328 | 325 | ::::{group-tab} VS Code |
@@ -353,7 +350,8 @@ This is similar to above, but not only between branches. |
353 | 350 |
|
354 | 351 | :::::{tabs} |
355 | 352 | ::::{group-tab} GitHub |
356 | | -Like above, one can compare commits on GitHub by adjusting the following URL: |
| 353 | +Following the `/compare`-trick above, one can compare commits on GitHub by |
| 354 | +adjusting the following URL: |
357 | 355 | `https://github.com/USER/recipe-book/compare/VERSION1..VERSION2` |
358 | 356 |
|
359 | 357 | Replace `USER` with your username and `VERSION1` and `VERSION2` with a commit hash or branch name. |
|
0 commit comments