■ Git Workflow Guide
1■■ Initialize Project
git init
Start tracking your folder with Git.
2■■ Configure Identity
git config --global [Link] "Your Name"
git config --global [Link] "your@[Link]"
Set your name and email for commits.
3■■ Check Status
git status
See which files are untracked, modified, or staged.
4■■ Stage & Commit
git add .
git commit -m "Initial commit"
Stage and save snapshots of your code.
5■■ Branching
git branch feature-1
git checkout feature-1
Create and switch to a new branch for changes.
6■■ Merge Changes
git checkout main
git merge feature-1
Bring branch changes into main project.
7■■ Remote Setup
git remote add origin
git branch -M main
git push -u origin main
Connect to GitHub and push code.
8■■ Update Project
git pull origin main
git push origin main
Keep project updated with remote.
9■■ Undo Mistakes
git restore
git reset
git reset --hard HEAD
Undo unwanted changes safely.
■ Stash Work
git stash
git stash pop
Save work temporarily and restore later.