Intro:
Pushing local code to GitHub is an essential developer skill.
# Initialize Git
git init
# Add remote repository
git remote add origin https://github.com/username/repo.git
# Stage and commit
git add .
git commit -m "Initial commit"
# Push to GitHub
git push -u origin main
Takeaway:
Always set .gitignore before your first commit to avoid pushing unnecessary files.
