Git A to Z: Local Setup to Advanced Workflow for Real-World Devs

Is it even possible to be a real-world developer without Git? Absolutely not.
In this post, I’ll guide you from zero to pro with Git — including installation, terminal usage, VS Code integration, and both basic & advanced commands.

🔧 ১. …


This content originally appeared on DEV Community and was authored by Masaud Ahmod

Is it even possible to be a real-world developer without Git? Absolutely not.

In this post, I’ll guide you from zero to pro with Git — including installation, terminal usage, VS Code integration, and both basic & advanced commands.

🔧 ১. Git Installation & Local Setup

✅ Step 1: Install Git

✅ Step 2: Git Global Config

git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

✅ Step 3: Add SSH Key (for GitHub/GitLab)

ssh-keygen -t ed25519 -C "youremail@example.com"

Then copy your public SSH key and add it to your GitHub/GitLab SSH settings.

📁 ২. Initial Project Setup & First Commit

🔹 Git Init

git init

🔹 File Stage & Commit

git add .
git commit -m "Initial commit"

🔹 Remote Add & Push

git remote add origin https://github.com/yourname/your-repo.git
git push -u origin main

🧪 ৩. Daily Workflow with Git (Pull, Push, Branching)

🔹 Clone

git clone https://github.com/yourname/project.git

🔹 Pull

git pull origin main

🔹 Branch Create & Switch

git checkout -b feature-x

🔹 Merge

git checkout main
git merge feature-x

🧠 ৪. Advanced Git Commands

🔹 Stash & Pop

git stash
git stash pop

🔹 Rebase

git checkout feature
git rebase main

🔹 Cherry-pick

git cherry-pick <commit-id>

🔹 Reset to Previous Commit

git reset --hard HEAD~1

💣 ৫. Common Mistakes & Fixes

  • Merge Conflict? Don’t panic. Fix the conflict markers, commit, and continue.

  • Detached HEAD? Switch back to a branch:

git switch main
  • Pulled wrong changes? Use git reflog to recover lost commits.

🚀 Bonus Tools

  1. GitHub CLI

  2. GitLens Extension (VS Code)

  3. Git Graph (VS Code Extension)

  4. GitHub Copilot

🧾 Cheat Sheet

📎 Download PDF: Git Cheat Sheet PDF

🙌 Connect With Me

🔗 GitHub: @masaudahmod

💬 Leave a comment if you want a Git crash course in video format

🌟 Follow me for more content on Git, React, Firebase, and MERN stack development


This content originally appeared on DEV Community and was authored by Masaud Ahmod


Print Share Comment Cite Upload Translate Updates
APA

Masaud Ahmod | Sciencx (2025-05-15T07:33:08+00:00) Git A to Z: Local Setup to Advanced Workflow for Real-World Devs. Retrieved from https://www.scien.cx/2025/05/15/git-a-to-z-local-setup-to-advanced-workflow-for-real-world-devs/

MLA
" » Git A to Z: Local Setup to Advanced Workflow for Real-World Devs." Masaud Ahmod | Sciencx - Thursday May 15, 2025, https://www.scien.cx/2025/05/15/git-a-to-z-local-setup-to-advanced-workflow-for-real-world-devs/
HARVARD
Masaud Ahmod | Sciencx Thursday May 15, 2025 » Git A to Z: Local Setup to Advanced Workflow for Real-World Devs., viewed ,<https://www.scien.cx/2025/05/15/git-a-to-z-local-setup-to-advanced-workflow-for-real-world-devs/>
VANCOUVER
Masaud Ahmod | Sciencx - » Git A to Z: Local Setup to Advanced Workflow for Real-World Devs. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/05/15/git-a-to-z-local-setup-to-advanced-workflow-for-real-world-devs/
CHICAGO
" » Git A to Z: Local Setup to Advanced Workflow for Real-World Devs." Masaud Ahmod | Sciencx - Accessed . https://www.scien.cx/2025/05/15/git-a-to-z-local-setup-to-advanced-workflow-for-real-world-devs/
IEEE
" » Git A to Z: Local Setup to Advanced Workflow for Real-World Devs." Masaud Ahmod | Sciencx [Online]. Available: https://www.scien.cx/2025/05/15/git-a-to-z-local-setup-to-advanced-workflow-for-real-world-devs/. [Accessed: ]
rf:citation
» Git A to Z: Local Setup to Advanced Workflow for Real-World Devs | Masaud Ahmod | Sciencx | https://www.scien.cx/2025/05/15/git-a-to-z-local-setup-to-advanced-workflow-for-real-world-devs/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.