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

1.6 KiB

Viewing File History

1. git log -- assignment.txt

alt text

2. git log -p -- assignment.txt

alt text

alt text

3. git log --oneline -- assignment.txt

alt text

How many commits modified this file?

3 commits

What differences do you see when adding the -p option?

Shows detailed changes for each commit in the file.

Viewing File History with Blame

1. git blame assignment.txt

alt text

2. git blame -L 1,5 assignment.txt

alt text

3. git blame assignment.txt

alt text

Who changed each line of the file?

Renejit

How does -L help when the file is large?

To view the history of specific lines in a file.

What extra information does -e provide?

To get the email id of the user who made the chages in the file.

Merging Branches

alt text

alt text

Merge Conflict

alt text

alt text

alt text

Did Git perform a fast-forward merge or a 3-way merge?

Perform fast-forward merge and merge conflict

What does git log --graph --oneline --all show after the merge?

alt text

git log --graph --oneline --all after Merge conflict

alt text