Skip to content

Commit 83c5c47

Browse files
committed
make it easier to compare branches; closes #457
1 parent 91692d1 commit 83c5c47

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

content/commits.md

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Committing changes
22

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
44
commits. In this part, we will record changes in two
55
ways: on a new branch (which supports multiple lines of work at once), and directly
66
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/>
4040

4141
We offer **three different paths** of how to do this exercise. For
4242
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).
4546

4647
:::{exercise} Exercise: Practice creating commits and branches (20 min)
4748
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
112113
:width: 60%
113114
:class: with-border
114115
:::
115-
1. Change to some sub-directory, for example `sides`
116+
1. Change to some sub-directory, for example `sides`.
116117
1. Make sure you are still on the `new-recipe` branch (it should say
117118
it at the top), and click "Add file" → "Create new file" from the
118119
upper right.
@@ -316,13 +317,9 @@ it makes sense later on.
316317
:::::{tabs}
317318

318319
::::{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`
326323
::::
327324

328325
::::{group-tab} VS Code
@@ -353,7 +350,8 @@ This is similar to above, but not only between branches.
353350

354351
:::::{tabs}
355352
::::{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:
357355
`https://github.com/USER/recipe-book/compare/VERSION1..VERSION2`
358356

359357
Replace `USER` with your username and `VERSION1` and `VERSION2` with a commit hash or branch name.

0 commit comments

Comments
 (0)