| name | git-workflow |
| description | Use for all Git operations, version control workflows, and repository management. Handles commits, branches, merges, releases. |
Git Workflow Skill
Core Operations
- Check status:
git status
- Stage changes:
git add . or specific files
- Commit changes:
git commit -m "message"
- Push changes:
git push
- Create branches:
git checkout -b feature-name
- Merge branches:
git merge branch-name
Commit Workflow
When making commits:
- Check current state: Run
git status to see changes
- Review changes: Use
git diff to see what will be committed
- Stage changes: Use
git add to stage relevant files
- Create commit: Write descriptive commit messages following project conventions
- Push changes: Send to remote repository
Branch Management
Feature Branch Workflow
git checkout -b feature/new-feature
git add .
git commit -m "Add new feature implementation"
git push -u origin feature/new-feature
Merge Process
git checkout main
git pull
git merge feature/new-feature
git push
git branch -d feature/new-feature
Release Workflow
- Update version numbers if needed
- Create release branch or tag
- Update changelog
- Create release commit
- Tag release:
git tag v1.0.0
- Push tags:
git push --tags
Common Issues & Solutions
Merge Conflicts
- Identify conflicting files with
git status
- Open files and resolve conflicts
- Mark as resolved:
git add <file>
- Complete merge:
git commit
Undo Operations
- Unstage file:
git reset HEAD <file>
- Undo last commit:
git reset --soft HEAD~1
- Undo commit completely:
git reset --hard HEAD~1
Repository Maintenance
- Clean up branches:
git branch -d branch-name
- Prune remote branches:
git remote prune origin
- Check history:
git log --oneline --graph
Integration with Other Skills
This skill often works with:
- taskfile: For automated git tasks
- format: For code formatting before commits
- project-specific workflows: For repository-specific processes