# πŸš€ Git Assignment – My Version Control Journey --- ## πŸ›  Step 1: Verifying Git Installation πŸ“Œ _First step was making sure Git was installed and working fine._ ![Git version check](git_version.png) βœ… 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 status](git_status.png) πŸ”Ž Git shows tracked, untracked, and staged files. --- ## βž• Step 3: Moving Files to Staging ✨ _I noticed some modifications and added them with_ `git add`. ![Git add](git_add.png) πŸ—‚ 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._ ![Git log](git_log.png) πŸ•’ Shows commit messages, author names, and dates. --- ## πŸ”Ή Step 5: Simplified Commit Log πŸ‘Ύ _To avoid too much detail, I used_ `git log --oneline`. ![Git log oneline](git_log_--oneline.png) ⚑ A compact and easy-to-read commit history. --- ## 🌳 Step 6: Visualizing History with Graph 🎨 _History is better when visualized, so I used graph mode._ ![Git log graph](git_log_--oneline_--graph.png) 🌿 Displays branches and merges clearly. --- ## πŸ” Step 7: Checking File Changes πŸ–‹ _Before committing, I inspected changes with_ `git diff`. ![Git diff](git_diff.png) πŸ”‘ Shows exact line changes inside files. --- ## πŸ†š Step 8: Comparing Two Versions βš”οΈ _To see what changed between two commits, I compared them._ ![Git diff between two commits](git_diff_commit_commit.png) πŸ“Œ Helps track project progress over time. --- ## 🌿 Step 9: Working with Branches πŸ”€ _I explored branches to work independently without touching main code._ ![Git branch](git_branch.png) 🌱 Branches allow experimentation safely. --- ## πŸ“₯ Step 10: Cloning a Repository πŸ›° _I downloaded a project from remote using_ `git clone`. ![Git clone](git_clone.png) πŸ“‚ 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`. ![Git pull](git_pull.png) --- ## 🌐 Step 12: Checking Remote Connections πŸ”— _I verified linked remote repositories with_ `git remote -v`. ![Git remote](git_remote.png) --- ## 🚫 Step 13: Using .gitignore πŸ“„ _Added a `.gitignore` file to skip tracking unnecessary stuff._ ![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 1–5. ![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. 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. 12. βœ… **Git Merge** – Performed and confirmed a 3-way merge. 13. βœ… **Git Blame** – Tracked who wrote each line (with -L and -e options). ---