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: week11/tutorial/tutorial-11.qmd
+13-13
Original file line number
Diff line number
Diff line change
@@ -43,40 +43,40 @@ They are identified with a unique SHA or SHA1 number.
43
43
You can move up and down by pressing `u` or `d`. To exit, press `q`.
44
44
:::
45
45
46
-
5. List the commits that have been done in the repo since 1 May 2020 only.
46
+
5. List the commits that have been done in the repo since 14 May 2024 only.
47
47
48
48
::: {.unilur-solution}
49
-
`git log --since=01-05-2020`
49
+
`git log --since=14-05-2024`
50
50
:::
51
51
52
-
6. Open the local project in VSCode and have a look at the tree history and the commit messages. Specially have a look at longer commits that contain not only one line but also some more text.
52
+
6. Open the local project in RStudio and have a look at the tree history and the commit messages. Specially have a look at longer commits that contain not only one line but also some more text.
53
53
54
54
7. Where is the repo HEAD?
55
55
56
-
8. Using the command line interface or terminal move the HEAD of the repository to the commit a82635e
56
+
8. Using the command line interface or terminal move the HEAD of the repository to two commits back from the most recent
57
57
58
58
::: {.unilur-solution}
59
-
`git checkout a82635e`
59
+
`git checkout e208fa8`
60
60
:::
61
61
62
-
9. What is the commit first line of commit a82635e?
62
+
9. What is the first line of the commit message of this commit?
63
63
64
64
::: {.unilur-solution}
65
-
Fix CI/rubocop / build
65
+
Merge pull request 4339 from isasharafdin/todo
66
66
:::
67
67
68
68
10. Which files have been modified in that commit?
11. What is the difference between commit a82635e and the previous commit?
74
+
11. What is the difference between this commit and the previous commit?
75
75
76
76
::: {.unilur-solution}
77
-
First, `git log a82635e` to find the SHA of the previous commits. Then, `git diff 108a0c92a9caa7 HEAD`
77
+
First, `git log e208fa8` to find the SHA of the previous commits. Then, `git diff ff120c2 HEAD`
78
78
79
-
{fig-align="center"}
79
+
:::
80
80
81
81
12. Move the HEAD of the repository back to where was originally located (last commit of the main (or master) branch)
82
82
@@ -120,7 +120,7 @@ To unstage, `git reset`.
120
120
121
121
19. Run a git log --oneline and have a look at the commit that you did before the last commit.
122
122
123
-
20. Pick the commit that you did before the last commit and do git reset SHA. What happens?
123
+
20. Pick the commit that you did before the last commit and do git reset SHA. What happens? Why is this not best practice?
124
124
125
125
::: {.unilur-solution}
126
126
```
@@ -129,5 +129,5 @@ git log
129
129
git reset SHA
130
130
```
131
131
132
-
You will see that the last commit has disappeared from the repo history.
132
+
You will see that the last commit has disappeared from the repo history. This is not considered best practice as it modifies the public record of the repository history.
0 commit comments