🚀 Complete GitHub Commands Guide
🧱 1. Initial Setup (First Time Only)
git config --global user.name " Your Name"
git config --global user.email " your@email.com"
git config --list
📁 2. Create / Initialize Repository
git clone https://github.com/username/repo.git
git status
git add .
git commit -m " your message"
git remote add origin https://github.com/username/repo.git
git remote -v
git branch -M main
git push -u origin main
git pull origin main --rebase
🔄 7. Daily Workflow (Best Practice)
git pull origin main --rebase
git add .
git commit -m " update"
git push
git branch feature-branch
git checkout feature-branch
git checkout -b feature-branch
git switch feature-branch
git checkout main
git merge feature-branch
Undo last commit (keep changes)
Undo last commit (delete changes)
git push origin main --force
git log
git log --oneline
git rm file.py
git commit -m " removed file"
.env
venv/
__pycache__/
node_modules/
models/
git pull origin main --rebase
git push
git remote remove origin
git remote add origin NEW_URL
git pull origin main --rebase
git add .
git commit -m " update"
git push