8 Commits

6 changed files with 83 additions and 1 deletions

View File

@ -128,6 +128,47 @@
---
## 📜 Step 14: Viewing File History
📖 _Checked the history of changes for a specific file using_ `git log filename`.
![File history](filehistory.png)
✅ 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`.
![Git blame](blame.png)
📌 Useful to identify responsibility for specific lines.
---
## 🔀 Step 16: Git Merge
🔗 _Merged changes from one branch into another using_ `git merge branchname`.
![Git merge](merge.png)
📌 Helps integrate changes from different branches into the main branch.
---
## 🌐 Step 17: Git Log (All, Oneline Graph)
📊 _Viewed a compact, visual history of all commits across branches using_
`git log --oneline --graph --all`.
![Git graph all](graphall.png)
📌 Great for visualizing the entire project history at a glance.
---
# ✨ Wrap-Up Notes
1.**Git Version Check** Confirmed installation.
@ -141,7 +182,41 @@
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.
13.**Git Merge** Combined branch histories.
14.**Git Graph (all, oneline)** Visualized all commits and branches.
---
💡 _Git isnt just a tool — its 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 2040** of the file.
---
### 📧 What extra information does `-e` provide?
**Ans:** It shows the **authors email address** alongside their name, useful when multiple contributors have the same display name.

7
README.md Normal file
View File

@ -0,0 +1,7 @@
<!-- @format -->
Git is case-sensitive → it sees readme.md and README.md as different files.
Windows/macOS are case-insensitive → they treat both names as the same file.
So when you rename only the case, the OS says "nothing changed," and Git doesnt record it.

BIN
blame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
filehistory.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
graphall.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
merge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB