Files
git-practice-leowhiteson/ASSIGNMENT-04-09-2025.md

33 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Git Assignment: Viewing History, Blame and Merging
## Part 1: Viewing File History
![alt text](image.png)
![alt text](image-1.png)
![alt text](image-2.png)
## 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 authors email address instead of just their name."
---
## Part 3: Merging Branches
![alt text](image-3.png)
## 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"