Git Push Workflow
Stage all changes, create a conventional commit, and push to the remote branch.
When to Use
Automatically activate when the user:
- Explicitly asks to push changes ("push this", "commit and push")
- Mentions saving work to remote ("save to github", "push to remote")
- Completes a feature and wants to share it
- Says phrases like "let's push this up" or "commit these changes"
Workflow
1. Check Status
git status
2. Stage Changes
git add -A
3. Create Conventional Commit
Use conventional commit format:
feat:- New featurefix:- Bug fixdocs:- Documentation changeschore:- Maintenance tasksrefactor:- Code refactoringtest:- Adding/fixing testsstyle:- Formatting changes
Example:
git commit -m "feat: add user authentication flow"
4. Push to Remote
git push -u origin main
Or for current branch:
git push
Best Practices
- Review changes before committing:
git diff - Keep commits focused and atomic
- Write descriptive commit messages
- Use branch names that describe the work
- Push frequently to avoid large divergences
