Tweet épinglé

I used to get stuck with Git almost every time there was a production deployment.
If you’re a developer, keep this list handy. You’ll probably use these commands more often than you think.
🟢 Daily Git Commands
• git status → Check changes
• git pull origin main → Get latest code
• git checkout -b feature-name → Create new branch
• git checkout main → Switch branch
• git add . → Stage all changes
• git commit -m "message" → Save changes
• git push origin feature-name → Push code
🔀 Branch Management
• git merge branch-name → Merge branch
• git rebase main → Reapply commits
• git branch -d branch-name → Delete branch
🚀 Before Production
• git fetch --all → Fetch updates
• git pull --rebase origin main → Sync cleanly
• git diff → Compare changes
• git log --oneline → View history
• git stash → Save work
• git stash pop → Restore work
• git tag v1.0.0 → Create release tag
🚑 Recovery Commands
• git reset --soft HEAD~1 → Undo commit
• git reset --hard HEAD~1 → Discard changes
• git revert → Reverse commit
• git reflog → Recover lost commits
• git cherry-pick → Copy commit
#Git #Programming #SoftwareEngineering #DevOps #Developer #Java #Backend #Tech

English































