Skip to content

πŸš€ Quick Workflow Reference

Daily Commands

Start Work on New Feature

Terminal window
git checkout develop
git pull origin develop
git checkout -b feature/your-feature-name

Save Your Work

Terminal window
git add .
git commit -m "Descriptive message here"
git push -u origin feature/your-feature-name

Create Pull Request

  1. Push your branch
  2. Go to GitHub
  3. Click β€œCompare & pull request”
  4. Base: develop ← Compare: your-branch
  5. Fill out template
  6. Create PR

After PR Approval

  • Click β€œSquash and merge”
  • Delete your feature branch
  • Pull latest develop

πŸ”— Important URLs

Your Environments

GitHub Pages

🌲 Branch Structure

main (production)
└── develop (staging)
β”œβ”€β”€ feature/add-user-export
β”œβ”€β”€ feature/update-ui
β”œβ”€β”€ fix/login-bug
└── hotfix/critical-fix (from main)

⚑ Quick Commands

Update Your Branch with Latest Changes

Terminal window
git checkout develop
git pull origin develop
git checkout feature/your-feature
git merge develop

See What Changed

Terminal window
git status # What files changed
git diff # What lines changed
git log --oneline # Recent commits

Undo Changes

Terminal window
git checkout -- file.txt # Undo changes to specific file
git reset --hard HEAD # Undo all changes (careful!)
git revert <commit-hash> # Undo a specific commit

Clean Up Branches

Terminal window
# Delete local branch
git branch -d feature/old-feature
# Delete remote branch
git push origin --delete feature/old-feature
# See all branches
git branch -a

πŸ“‹ PR Checklist

  • Code builds locally (npm run build)
  • No console errors
  • Tests pass (if applicable)
  • PR has descriptive title
  • PR template filled out
  • Linked to issue (if applicable)
  • Ready for review

🚨 Emergency Hotfix

Terminal window
# Branch from main, not develop!
git checkout main
git pull origin main
git checkout -b hotfix/critical-bug-name
# After fix is merged to main, sync develop
git checkout develop
git merge main
git push origin develop

🎯 Feature Flags

Naming Convention

  • feature/ - New features
  • fix/ - Bug fixes
  • update/ - Dependencies or refactoring
  • hotfix/ - Emergency production fixes
  • docs/ - Documentation only

Commit Messages

Terminal window
# Good examples
"Add user export functionality with CSV support"
"Fix login redirect loop on session timeout"
"Update React to v18.2.0"
"Refactor ticket service for better performance"
# Bad examples
"Fix bug"
"Update files"
"WIP"
"asdf"

πŸ”₯ Common Issues

Merge Conflicts

Terminal window
# See conflicting files
git status
# After resolving in VS Code
git add .
git commit -m "Resolve merge conflicts"
git push

Accidental Commit to Wrong Branch

Terminal window
# If you haven't pushed yet
git reset HEAD~1
git stash
git checkout correct-branch
git stash pop

Need to Change Last Commit Message

Terminal window
# If you haven't pushed
git commit --amend -m "New message"
# If you already pushed (careful!)
git push --force-with-lease

πŸ’‘ Pro Tips

  1. Always pull before starting work
  2. Branch from develop, not main
  3. Keep PRs small and focused
  4. Test on preview URL before merging
  5. Never force push to develop or main
  6. Use meaningful branch names
  7. Write clear commit messages
  8. Delete branches after merging

πŸ“± Mobile Testing URLs

Test your preview on mobile:

  1. Get preview URL from PR
  2. Open on phone browser
  3. Or use Chrome DevTools device mode

πŸŽ‰ Success Flow

Feature β†’ PR β†’ Preview β†’ βœ… Review β†’ Staging β†’ βœ… Test β†’ Production β†’ πŸŽ‰

Remember: When in doubt, ask! It’s better to double-check than to accidentally deploy to production.