π Quick Workflow Reference
Daily Commands
Start Work on New Feature
git checkout developgit pull origin developgit checkout -b feature/your-feature-nameSave Your Work
git add .git commit -m "Descriptive message here"git push -u origin feature/your-feature-nameCreate Pull Request
- Push your branch
- Go to GitHub
- Click βCompare & pull requestβ
- Base:
developβ Compare:your-branch - Fill out template
- Create PR
After PR Approval
- Click βSquash and mergeβ
- Delete your feature branch
- Pull latest develop
π Important URLs
Your Environments
- Production: https://your-project-id.web.app
- Staging: https://your-project-idβstaging.web.app
- PR Preview: Check PR comments (https://your-project-idβpr-NUMBER.web.app)
GitHub Pages
- Repository: https://github.com/LarryAnglin/HelpDesk
- Actions: https://github.com/LarryAnglin/HelpDesk/actions
- Pull Requests: https://github.com/LarryAnglin/HelpDesk/pulls
- Settings: https://github.com/LarryAnglin/HelpDesk/settings
π² 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
git checkout developgit pull origin developgit checkout feature/your-featuregit merge developSee What Changed
git status # What files changedgit diff # What lines changedgit log --oneline # Recent commitsUndo Changes
git checkout -- file.txt # Undo changes to specific filegit reset --hard HEAD # Undo all changes (careful!)git revert <commit-hash> # Undo a specific commitClean Up Branches
# Delete local branchgit branch -d feature/old-feature
# Delete remote branchgit push origin --delete feature/old-feature
# See all branchesgit 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
# Branch from main, not develop!git checkout maingit pull origin maingit checkout -b hotfix/critical-bug-name
# After fix is merged to main, sync developgit checkout developgit merge maingit push origin developπ― Feature Flags
Naming Convention
feature/- New featuresfix/- Bug fixesupdate/- Dependencies or refactoringhotfix/- Emergency production fixesdocs/- Documentation only
Commit Messages
# 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
# See conflicting filesgit status
# After resolving in VS Codegit add .git commit -m "Resolve merge conflicts"git pushAccidental Commit to Wrong Branch
# If you haven't pushed yetgit reset HEAD~1git stashgit checkout correct-branchgit stash popNeed to Change Last Commit Message
# If you haven't pushedgit commit --amend -m "New message"
# If you already pushed (careful!)git push --force-with-leaseπ‘ Pro Tips
- Always pull before starting work
- Branch from develop, not main
- Keep PRs small and focused
- Test on preview URL before merging
- Never force push to develop or main
- Use meaningful branch names
- Write clear commit messages
- Delete branches after merging
π± Mobile Testing URLs
Test your preview on mobile:
- Get preview URL from PR
- Open on phone browser
- 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.