2 Commits

Author SHA1 Message Date
85eb68dc0e accept merge file 2025-09-11 12:21:57 +05:30
69416d7da8 added new line after switch bugReport branch 2025-09-11 12:09:10 +05:30
11 changed files with 2 additions and 83 deletions

View File

@@ -1,16 +0,0 @@
## Q1: Did Git perform a fast-forward merge or a 3-way merge?
Git performed a **3-way merge**.
### Explanation:
- A **fast-forward merge** happens when the branch pointer can just be moved forward because no new commits exist on the target branch since the branching point.
- A **3-way merge** happens when both branches have new commits, and Git needs to create a merge commit by combining changes from both sides.
In my case, both `feature/bugReport` and `feature/mergeFile` had new commits, so Git created a merge commit.
Thus, it was a **3-way merge**.
---
## Q2: What does `git log --graph --oneline --all` show after the merge?
![git log --graph --oneline --all](git_log_--graph_--oneline_--all.png)

View File

@@ -125,71 +125,7 @@
![Git ignore](gitignore_file.png)
---
## 🔀 Step 14: Performing a Merge
_I merged changes from another branch into my current branch._
![git log --merge](git_log_--_merge.txt.png)
📌 Since both branches had commits, Git created a **3-way merge commit** (not a fast-forward merge).
---
## 📜 Step 15: Inspecting Merge Commit Details
👀 _I used `git log -p -- merge.txt` to review the merge commit changes._
![git log -p -- merge.txt](git_log_-p_--_merge.txt.png)
📝 Shows added and modified lines from both branches.
---
## 🗂 Step 16: Checking Simplified Log After Merge
_To quickly see the commit history after the merge, I ran:_
![git log --oneline -- merge.txt](git_log_--oneline_--_merge.txt.png)
---
## 🌳 Step 17: Visualizing All Branches and Merge
🎨 Using the graph mode to visualize history clearly:
![git log --graph --oneline --all](git_log_--graph_--oneline_--all.png)
🌿 Shows both branches and the merge commit.
---
## Step 18: Blame Tracking Line History
🖊 With git blame, I checked who wrote each line in merge.txt.
![git blame merge.txt](git_blame_merge.txt.png)
🔑 Each line is attributed to its commit.
---
## 🎯 Step 19: Blame with Line Range
🎯 To narrow focus, I ran blame only for lines 15.
![git blame -L 1,5 merge.txt](git_blame_-L_1,5_merge.txt.png)
---
## 📧 Step 20: Blame with Email
📧 Finally, I checked the author emails using git blame -e.
![git blame -e merge.txt](git_blame_-e_merge.txt.png)
---
## 🔀 Step 21: Merging Branch `feature/mergeFile` into Main
_I merged the branch `feature/bugReport` into `feature/mergeFile` using the command:_
![git merge feature/mergeFile](git_merge.png)
---
# ✨ Summary
1.**Git Version Check** Verified installation.
@@ -203,6 +139,5 @@
9.**Git Pull** Pulled updates.
10.**Git Remote** Checked remotes.
11.**Git Ignore** Excluded files.
12.**Git Merge** Performed and confirmed a 3-way merge.
13.**Git Blame** Tracked who wrote each line (with -L and -e options).
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB