Tech Thursday Assignment - 04-09-2025 #3
This commit is contained in:
33
ASSIGNMENT-04-09-2025.md
Normal file
33
ASSIGNMENT-04-09-2025.md
Normal file
@ -0,0 +1,33 @@
|
||||
## Git Assignment: Viewing History, Blame and Merging
|
||||
## Part 1: Viewing File History
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Questions to answer in your notes:
|
||||
## How many commits modified this file?
|
||||
"2 commits modified this file."
|
||||
|
||||
## What differences do you see when adding the -p option?
|
||||
"With the -p option, Git not only shows the commit messages and IDs but also displays the patch (diff) — the exact line-by-line changes made in the file, showing which lines were removed (-) and which were added (+)."
|
||||
---
|
||||
### Part 2: Viewing File History with Blame
|
||||
## uestions to answer in your notes:
|
||||
## Who changed each line of the file?
|
||||
"git blame command shows who last changed each line of the file, with commit ID, author, date, and line content."
|
||||
## How does -L help when the file is large?
|
||||
|
||||
"The -L option in git blame lets you limit the output to a specific range of lines."
|
||||
## What extra information does -e provide?
|
||||
"The -e option in git blame shows the author’s email address instead of just their name."
|
||||
---
|
||||
## Part 3: Merging Branches
|
||||

|
||||
|
||||
## Questions to answer in your notes:
|
||||
|
||||
## Did Git perform a fast-forward merge or a 3-way merge?
|
||||
"Git did not perform a fast-forward merge. A fast-forward merge happens when the master branch can just move its pointer to the feature branch because there are no divergent changes."
|
||||
## What does git log --graph --oneline --all show after the merge?
|
||||
"After the merge, git log --graph --oneline --all will show a branch graph with the master and feature branch diverging and then joining at the merge commit"
|
Reference in New Issue
Block a user