- Регистрация
- 1 Мар 2015
- Сообщения
- 1,481
- Баллы
- 155
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
git push -u origin main
? ৩. Daily Workflow with Git (Pull, Push, Branching)
? Clone
git clone
? 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
git switch main
? GitHub:
? 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
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
Windows:
Mac: Use Homebrew brew install git
Linux: sudo apt install git
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"
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
git push -u origin main
? ৩. Daily Workflow with Git (Pull, Push, Branching)
? Clone
git clone
? 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.
? Connect With Me? Download PDF:
? GitHub:
? 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