From 8d5082322a92d35079c48fe18e42a0b3e5d50e44 Mon Sep 17 00:00:00 2001 From: Mikael Stellio <67868694+stelliom@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:39:03 +0100 Subject: [PATCH 1/2] Fixed bullet-points in exercise 3 --- beginner/Exercise_3_restore_merge.md | 54 ++++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/beginner/Exercise_3_restore_merge.md b/beginner/Exercise_3_restore_merge.md index 57063df..336c2ea 100644 --- a/beginner/Exercise_3_restore_merge.md +++ b/beginner/Exercise_3_restore_merge.md @@ -47,48 +47,48 @@ Originally we planned poster sessions in the morning, but the invited professors 2. Check the Git history for the commit that changed the poster sessions to talks. -The professors have now canceled their talks and we want to have the poster sessions in the morning again. + The professors have now canceled their talks and we want to have the poster sessions in the morning again. -To avoid doing the same work twice, we want to reuse the old schedules that we designed in the first place. + To avoid doing the same work twice, we want to reuse the old schedules that we designed in the first place. -We can use `git restore` to get any version of a file along its Git history. + We can use `git restore` to get any version of a file along its Git history. -Just run `git restore -s `. + Just run `git restore -s `. -> [!NOTE] -> For simplicity, we've used the `-s` option in the `git restore` command. Note that `-s` is a shorthand for `--source`, which you can also use interchangeably. The primary difference lies in the syntax: use `-s ` for a shorter command, or `--source=` if you prefer a more explicit approach. Both options perform the same function: specifying the source from which to restore. Whether you prefer `-s` for brevity or `--source` for clarity is up to you. + > [!NOTE] + > For simplicity, we've used the `-s` option in the `git restore` command. Note that `-s` is a shorthand for `--source`, which you can also use interchangeably. The primary difference lies in the syntax: use `-s ` for a shorter command, or `--source=` if you prefer a more explicit approach. Both options perform the same function: specifying the source from which to restore. Whether you prefer `-s` for brevity or `--source` for clarity is up to you. -2. Undo "Change poster sessions to talks" by restoring the *schedule_day1.txt* to the commit before the change. +3. Undo "Change poster sessions to talks" by restoring the *schedule_day1.txt* to the commit before the change. -3. Review *schedule_day1.txt* to see if the talk has been changed back to a poster session. +4. Review *schedule_day1.txt* to see if the talk has been changed back to a poster session. -4. Do exactly the same for *schedule_day2.txt*. +5. Do exactly the same for *schedule_day2.txt*. -5. Check if Git tracked the changes. +6. Check if Git tracked the changes. -6. Add and commit your updated schedules +7. Add and commit your updated schedules -7. Now check the Git history +8. Now check the Git history -Each *commit hash* is unique, so you can always go to any version of the tracked files, *even* across different branches. + Each *commit hash* is unique, so you can always go to any version of the tracked files, *even* across different branches. -8. You decide to not have the workshop on day 1 anymore. So restore *schedule_day1.txt* before the "Add workshops" commit. +9. You decide to not have the workshop on day 1 anymore. So restore *schedule_day1.txt* before the "Add workshops" commit. -9. Add and commit *schedule_day1.txt*. +10. Add and commit *schedule_day1.txt*. -10. Check the Git history with `git log --oneline` for a short summary. +11. Check the Git history with `git log --oneline` for a short summary. -Your output should look similar to: -``` -b7bd111 (HEAD -> main) Remove workshop on day 1 -f6c3f04 Change talks back to poster sessions -5889296 Change poster sessions to talks -464fc92 Add workshops -e53b1e0 Add coffee break -f1b23c1 Add poster sessions in the morning -f636890 Add schedule_day2 -206f724 Add schedule_day1 -``` + Your output should look similar to: + ``` + b7bd111 (HEAD -> main) Remove workshop on day 1 + f6c3f04 Change talks back to poster sessions + 5889296 Change poster sessions to talks + 464fc92 Add workshops + e53b1e0 Add coffee break + f1b23c1 Add poster sessions in the morning + f636890 Add schedule_day2 + 206f724 Add schedule_day1 + ``` ### Merge two branches (without merge conflicts) From b5155e3911804f94afd42247062283b1d163363f Mon Sep 17 00:00:00 2001 From: Mikael Stellio <67868694+stelliom@users.noreply.github.com> Date: Tue, 23 Jun 2026 22:22:41 +0200 Subject: [PATCH 2/2] Indent text under all bullet points --- beginner/Exercise_3_restore_merge.md | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/beginner/Exercise_3_restore_merge.md b/beginner/Exercise_3_restore_merge.md index 336c2ea..7cc1eb0 100644 --- a/beginner/Exercise_3_restore_merge.md +++ b/beginner/Exercise_3_restore_merge.md @@ -41,9 +41,9 @@ init_repo 1. Review the schedules for the two days in the files *schedule_day1.txt* and *schedule_day2.txt*. -The schedules for both days start with talks. + The schedules for both days start with talks. -Originally we planned poster sessions in the morning, but the invited professors only had time in the morning to give their talks, so we changed the poster sessions to talks. + Originally we planned poster sessions in the morning, but the invited professors only had time in the morning to give their talks, so we changed the poster sessions to talks. 2. Check the Git history for the commit that changed the poster sessions to talks. @@ -55,8 +55,8 @@ Originally we planned poster sessions in the morning, but the invited professors Just run `git restore -s `. - > [!NOTE] - > For simplicity, we've used the `-s` option in the `git restore` command. Note that `-s` is a shorthand for `--source`, which you can also use interchangeably. The primary difference lies in the syntax: use `-s ` for a shorter command, or `--source=` if you prefer a more explicit approach. Both options perform the same function: specifying the source from which to restore. Whether you prefer `-s` for brevity or `--source` for clarity is up to you. +> [!NOTE] +> For simplicity, we've used the `-s` option in the `git restore` command. Note that `-s` is a shorthand for `--source`, which you can also use interchangeably. The primary difference lies in the syntax: use `-s ` for a shorter command, or `--source=` if you prefer a more explicit approach. Both options perform the same function: specifying the source from which to restore. Whether you prefer `-s` for brevity or `--source` for clarity is up to you. 3. Undo "Change poster sessions to talks" by restoring the *schedule_day1.txt* to the commit before the change. @@ -114,11 +114,11 @@ There are two sections in *schedule_day1.txt*, which we will change on separate 8. Switch back to the *main* branch. Check your branches; they should look like this: -```bash - daily_program - evening_activity -* main -``` + ```bash + daily_program + evening_activity + * main + ``` #### Fast-forward merge @@ -139,20 +139,20 @@ Therefore, when you merge *daily_program* into *main*, Git will create a merge c 13. Check the history and the contents of the schedules. The *main* branch should now contain both sets of changes: daily program and evening activity. -Your Git log should look like this: -``` -c0d0459 (HEAD -> main) Merge daily_program -b1be3b4 (daily_program) Add talks -4d93eac Add evening activities -b7bd111 Remove workshop on day 1 -f6c3f04 Change talks back to poster sessions -5889296 Change poster sessions to talks -464fc92 Add workshops -e53b1e0 Add coffee break -f1b23c1 Add poster sessions in the morning -f636890 Add schedule_day2 -206f724 Add schedule_day1 -``` + Your Git log should look like this: + ``` + c0d0459 (HEAD -> main) Merge daily_program + b1be3b4 (daily_program) Add talks + 4d93eac Add evening activities + b7bd111 Remove workshop on day 1 + f6c3f04 Change talks back to poster sessions + 5889296 Change poster sessions to talks + 464fc92 Add workshops + e53b1e0 Add coffee break + f1b23c1 Add poster sessions in the morning + f636890 Add schedule_day2 + 206f724 Add schedule_day1 + ``` 14. Delete the branch you just merged.