Git & GitHub Hands-on Learning: Mastering Version Control

🚀 Git & GitHub – Hands-on Learning. Recently, I deep-dived into Git & GitHub by creating a practice repository and performing everything manually. 💡 Big takeaway: Git is like a time machine for code. Every commit saves a checkpoint, so we can safely move forward and roll back when needed. 🔹 What I learned & practiced: Git vs GitHub Git = local version control tool GitHub = cloud platform to host & share repositories Repository & Internals Repo contains code + history .git works like a database storing all metadata Configuration & Basics Configured user identity using git config Used git init, git status, git add, git commit File States & Flow Working Directory → Staging → Commit Understood untracked, modified, staged, committed states Commits & History Used git log, git log --oneline Learned that HEAD points to the latest commit Branching & Merging Created branches using git switch -c Practiced fast-forward & non-fast-forward merges Resolved merge conflicts in VS Code Rebase & Recovery Used rebase for clean, linear history Used git reflog and git reset --hard for time travel Diff, Cherry-pick & Stash Compared changes using git diff Cherry-picked specific commits across branches Used git stash to manage work-in-progress Ignore, Keep & Remote Ops Used .gitignore and .gitkeep Pushed, pulled, and cloned repositories using GitHub 📌 All concepts were practiced locally and pushed to GitHub as a learning project. Big thanks to Ansh Lamba for the clear and practical Git tutorials. Sharing this in case it helps someone starting their Git journey 🚀 Practice > Theory, always. 👇 Feel free to check the GitHub repository link in the comments. #Git #GitHub #VersionControl #LearningByDoing #DeveloperJourney #ContinuousLearning

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories