Compare commits
3 Commits
feature/bu
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ccc4957202 | |||
| 3fc5f3b537 | |||
|
|
9ea085c487 |
3
.gitignore
vendored
@@ -1,3 +0,0 @@
|
|||||||
this file wont visibile in git
|
|
||||||
secret.txt
|
|
||||||
.env
|
|
||||||
@@ -1,143 +1,7 @@
|
|||||||
# 🚀 Git Assignment – My Version Control Journey
|
## Create Repository in Organization
|
||||||
|
|
||||||
---
|
- Visited the Git-Training-Hub organization on Git Comorin.
|
||||||
|
- Created a new repository named git-practice-Ajin with no README, .gitignore, or license.
|
||||||
|
- The repository is empty as required.
|
||||||
|
|
||||||
## 🛠 Step 1: Verifying Git Installation
|

|
||||||
|
|
||||||
📌 _First step was making sure Git was installed and working fine._
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
✅ The output displayed the installed Git version.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📂 Step 2: Checking Repository Status
|
|
||||||
|
|
||||||
👀 _Next, I checked the repo to see if there were pending changes._
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
🔎 Git shows tracked, untracked, and staged files.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ➕ Step 3: Moving Files to Staging
|
|
||||||
|
|
||||||
✨ _I noticed some modifications and added them with_ `git add`.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
🗂 Files are now ready to be saved in the next commit.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📝 Step 4: Reviewing Commit History
|
|
||||||
|
|
||||||
📖 _Every commit is part of the project’s story, so I reviewed mine._
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
🕒 Shows commit messages, author names, and dates.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔹 Step 5: Simplified Commit Log
|
|
||||||
|
|
||||||
👾 _To avoid too much detail, I used_ `git log --oneline`.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
⚡ A compact and easy-to-read commit history.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🌳 Step 6: Visualizing History with Graph
|
|
||||||
|
|
||||||
🎨 _History is better when visualized, so I used graph mode._
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
🌿 Displays branches and merges clearly.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔍 Step 7: Checking File Changes
|
|
||||||
|
|
||||||
🖋 _Before committing, I inspected changes with_ `git diff`.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
🔑 Shows exact line changes inside files.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🆚 Step 8: Comparing Two Versions
|
|
||||||
|
|
||||||
⚔️ _To see what changed between two commits, I compared them._
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
📌 Helps track project progress over time.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🌿 Step 9: Working with Branches
|
|
||||||
|
|
||||||
🔀 _I explored branches to work independently without touching main code._
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
🌱 Branches allow experimentation safely.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📥 Step 10: Cloning a Repository
|
|
||||||
|
|
||||||
🛰 _I downloaded a project from remote using_ `git clone`.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
📂 A full copy is now available locally.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📥 Step 11: Pulling Remote Updates
|
|
||||||
|
|
||||||
🛰 _To stay up to date, I fetched and merged with_ `git pull origin`.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🌐 Step 12: Checking Remote Connections
|
|
||||||
|
|
||||||
🔗 _I verified linked remote repositories with_ `git remote -v`.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚫 Step 13: Using .gitignore
|
|
||||||
|
|
||||||
📄 _Added a `.gitignore` file to skip tracking unnecessary stuff._
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# ✨ Summary
|
|
||||||
|
|
||||||
1. ✅ **Git Version Check** – Verified installation.
|
|
||||||
2. ✅ **Git Status** – Checked repository state.
|
|
||||||
3. ✅ **Git Add** – Staged changes.
|
|
||||||
4. ✅ **Git Log** – Viewed history.
|
|
||||||
5. ✅ **Git Log (oneline/graph)** – Short + visual log.
|
|
||||||
6. ✅ **Git Diff** – Compared file changes.
|
|
||||||
7. ✅ **Git Branch** – Created/checked branches.
|
|
||||||
8. ✅ **Git Clone** – Cloned repo locally.
|
|
||||||
9. ✅ **Git Pull** – Pulled updates.
|
|
||||||
10. ✅ **Git Remote** – Checked remotes.
|
|
||||||
11. ✅ **Git Ignore** – Excluded files.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
BIN
git_branch.png
|
Before Width: | Height: | Size: 6.2 KiB |
BIN
git_branch_create_checkout.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
git_clone.png
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 27 KiB |
BIN
git_pull.png
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
BIN
git_readme.png
|
Before Width: | Height: | Size: 62 KiB |
BIN
git_remote.png
|
Before Width: | Height: | Size: 18 KiB |
BIN
git_status.png
|
Before Width: | Height: | Size: 22 KiB |
BIN
git_version.png
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 31 KiB |
17
index.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>Hello World</h1>
|
||||||
|
<p>This is a sample HTML document.</p>
|
||||||
|
<p>Lorem ipsum dolor sit, amet consectetur adipisicing elit. Libero magni porro totam consequatur architecto ipsum
|
||||||
|
id, voluptate ullam ex facilis fugit quae consequuntur animi, quis deserunt laboriosam! Harum, vero ut.</p>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# created new merge file
|
|
||||||
# added a second line for this file
|
|
||||||
# added a third line for this file
|
|
||||||
# added a fourth line for this file
|
|
||||||
# added a fifth line for this file
|
|
||||||
# added a sixth line for this file
|
|
||||||
# changed to new mergeFile branch
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
create new branch and checkout to the new branch
|
|
||||||
edit text
|
|
||||||
35
readme.md
@@ -1,35 +0,0 @@
|
|||||||
1️⃣ Reproduce the situation
|
|
||||||
|
|
||||||
- Initially, my repo had a file called readme.md.
|
|
||||||
- I renamed it to README.md (only case change).
|
|
||||||
- After running:
|
|
||||||
|
|
||||||
`git status`
|
|
||||||
|
|
||||||
Git showed no changes, meaning it did not detect the rename.
|
|
||||||
|
|
||||||
📸  – Git did not show any changes after renaming readme.md → README.md
|
|
||||||
|
|
||||||
2️⃣ Investigate why Git is not tracking the rename
|
|
||||||
|
|
||||||
- Git depends on the filesystem to detect changes.
|
|
||||||
- On Windows (NTFS, FAT), the filesystem is case-insensitive.
|
|
||||||
- That means readme.md and README.md are treated as the same file.
|
|
||||||
- Because Windows reports no difference, Git assumes nothing happened.
|
|
||||||
|
|
||||||
3️⃣ Correct steps to make Git recognize and commit the rename
|
|
||||||
|
|
||||||
To force Git to recognize the case-only rename:
|
|
||||||
|
|
||||||
`git mv -f readme.md README.md`
|
|
||||||
`git commit -m "Rename readme.md to README.md"`
|
|
||||||
|
|
||||||
4️⃣ Underlying reason
|
|
||||||
|
|
||||||
- Git itself is case-sensitive → it can distinguish between readme.md and README.md.
|
|
||||||
- Windows filesystems are case-insensitive → both names point to the same file.
|
|
||||||
- On Linux/macOS (case-sensitive), Git would automatically detect the rename.
|
|
||||||
- On Windows, we must explicitly force it with git mv -f.
|
|
||||||
|
|
||||||
✅ Conclusion:
|
|
||||||
It’s due to the way Git (case-sensitive) interacts with Windows (case-insensitive) filesystems.
|
|
||||||
BIN
repo_update.png
|
Before Width: | Height: | Size: 27 KiB |