Add git blame image
This commit is contained in:
@ -128,6 +128,26 @@
|
||||
|
||||
---
|
||||
|
||||
## 📜 Step 14: Viewing File History
|
||||
|
||||
📖 _Checked the history of changes for a specific file using_ `git log filename`.
|
||||
|
||||

|
||||
|
||||
✅ Shows all commits that modified the file, with author, date, and commit messages.
|
||||
|
||||
---
|
||||
|
||||
## 🕵️ Step 15: Git Blame
|
||||
|
||||
🔎 _Tracked who last modified each line of a file using_ `git blame filename`.
|
||||
|
||||

|
||||
|
||||
📌 Useful to identify responsibility for specific lines.
|
||||
|
||||
---
|
||||
|
||||
# ✨ Wrap-Up Notes
|
||||
|
||||
1. ✅ **Git Version Check** – Confirmed installation.
|
||||
@ -141,7 +161,39 @@
|
||||
9. ✅ **Git Pull** – Synced changes from remote.
|
||||
10. ✅ **Git Remote** – Checked repository connections.
|
||||
11. ✅ **Git Ignore** – Excluded unnecessary files.
|
||||
12. ✅ **Git File History & Blame** – Tracked changes and contributors line by line.
|
||||
|
||||
---
|
||||
|
||||
💡 _Git isn’t just a tool — it’s a time machine for your code!_ 🚀
|
||||
# ❓ Questions & Answers
|
||||
|
||||
### 🔢 How many commits modified this file?
|
||||
|
||||
**Ans:** `1`
|
||||
|
||||
---
|
||||
|
||||
### 🧩 What differences do you see when adding the `-p` option?
|
||||
|
||||
**Ans:**
|
||||
|
||||
- Without `-p` → Only commit metadata (hash, author, date, message).
|
||||
- With `-p` → Shows the actual diff (patch), i.e., the lines added (`+`) or removed (`-`) in each commit.
|
||||
|
||||
---
|
||||
|
||||
### 👤 Who changed each line of the file?
|
||||
|
||||
**Ans:** `vipinraj01`
|
||||
|
||||
---
|
||||
|
||||
### 📏 How does `-L` help when the file is large?
|
||||
|
||||
**Ans:** It limits the log output to specific lines, e.g., shows commit history only for **lines 20–40** of the file.
|
||||
|
||||
---
|
||||
|
||||
### 📧 What extra information does `-e` provide?
|
||||
|
||||
**Ans:** It shows the **author’s email address** alongside their name, useful when multiple contributors have the same display name.
|
||||
|
BIN
filehistory.png
Normal file
BIN
filehistory.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 89 KiB |
Reference in New Issue
Block a user