Commit 93501afd authored by Tomas Karol Hoger's avatar Tomas Karol Hoger
Browse files

add answers to class 6 hw

parent d89f6659
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
# Question 1
git log --merges --since="01-03-2025" --until="25-03-2025"
git log --merges --since="01-03-2025" --until="25-03-2025" | grep "commit" | wc -l
18
---
# Question 2
git log --grep="add bonus task info in README.md"
Irina Gulina
---
# Question 3
git log --pretty=oneline | grep -i "fix"
46ff88286c5f87ec8c2c0628524d164f3e451aeb
This commit has a vague message, while the only changes were
renaming the branches and adding one sentence at the end of the task.
My suggestion is to either to reword the commit message to clearly describe the changes,
or even better, split the commit into two separate commits so that it is clear which one does what.
---
# Question 4
git log --graph --decorate --oneline
git rev-parse 069847a~2^2
---
# Question 5
git shortlog -s -n --all --until="23-03-2025"
git shortlog -s -n --all --until="23-03-2025" | wc -l
30
---
# Question 6
(I accidentally discovered this while doing question 7 first (I skipped this one),
it was the first commit that showed up)
git show b0397999df618cb76b9409a0bb1efaf6033eb11a
---
# Question 7
git log -p -- README.md
git log -p -- README.md | grep -F "+**Grading**: successfully complete 5 mandatory homeworks, or 4/5 homeworks plus a bonus task"
git log -p -- README.md | grep -F "+**Grading**: successfully complete 5 mandatory homeworks, or 4/5 homeworks plus a bonus task" -n
git log -p -- README.md > temp.txt
commit 35c747bd17c2dab94d4331a9fcfbc6dd53dfbec8
 No newline at end of file