| name | git-workflow |
| description | Git and GitHub best practices for AWS Coworker change management |
| version | 1.0.0 |
| category | core |
| agents | ["aws-coworker-meta-designer","aws-coworker-core"] |
| tools | ["Bash","Read","Write"] |
Git Workflow
Purpose
This skill provides Git and GitHub best practices for managing changes within AWS Coworker. It ensures consistent, reviewable, and reversible change management across all AWS Coworker components.
When to Use
- Creating or modifying AWS Coworker components (agents, skills, commands)
- Proposing infrastructure changes via IaC
- Managing configuration changes
- Collaborating on AWS Coworker improvements
When NOT to Use
- Direct AWS CLI operations (Git is for code/config, not runtime state)
- Emergency break-glass scenarios (follow incident procedures first)
Branch Strategy
Branch Types
| Type | Pattern | Purpose | Merge Target |
|---|
| Main | main | Stable baseline | N/A (protected) |
| Feature | feature/{description} | New capabilities | main |
| Fix | fix/{description} | Bug fixes | main |
| Refactor | refactor/{description} | Code improvements | main |
| Docs | docs/{description} | Documentation updates | main |
| Release | release/v{version} | Release preparation | main + tag |
Naming Conventions
feature/add-eks-skill
fix/guardrail-validation-error
refactor/simplify-planner-workflow
docs/improve-getting-started
feature/stuff
my-branch
Feature/Add-EKS-Skill
feature/add_eks_skill
Commit Practices
Commit Message Format
<type>: <subject>
<body>
<footer>
Type Prefixes
| Type | Use For |
|---|
feat | New features |
fix | Bug fixes |
docs | Documentation |
refactor | Code restructuring |
style | Formatting (no logic change) |
test | Adding tests |
chore | Maintenance tasks |
Examples
git commit -m "feat: add EKS discovery commands to aws-cli-playbook"
git commit -m "fix: correct region validation in executor agent
The executor was accepting invalid region codes due to
a regex pattern error. This fix:
- Updates the region validation regex
- Adds test cases for edge cases
- Documents valid region formats
Fixes #42"
Commit Hygiene
Do:
- Make atomic commits (one logical change per commit)
- Write clear, descriptive messages
- Reference issues/PRs in footer when relevant
Don't:
- Commit secrets or credentials
- Make massive commits with unrelated changes
- Use vague messages like "fix stuff" or "updates"
Pull Request Process
Creating a PR
git checkout -b feature/add-new-skill
git add skills/aws/new-skill/SKILL.md
git commit -m "feat: add new-skill for [purpose]"
git push -u origin feature/add-new-skill
gh pr create --title "Add new-skill" --body "..."
PR Description Template
## Summary
[Brief description of changes]
## Changes
- [Change 1]
- [Change 2]
- [Change 3]
## Testing
- [ ] Tested in sandbox environment
- [ ] Ran audit-library checks
- [ ] Verified documentation accuracy
## Related
- Fixes #[issue]
- Related to #[PR]
Review Checklist
For reviewers:
Tagging and Releases
Version Tags
Follow semantic versioning:
git tag -a v1.2.0 -m "Release v1.2.0: Add EKS support"
git push origin v1.2.0
git tag -l "v*"
Baseline Tags
For rollback points:
git tag -a baseline/pre-org-customization -m "Baseline before org customization"
git tag -a baseline/2026-01-29 -m "Baseline 2026-01-29"
Common Operations
Starting New Work
git checkout main
git pull origin main
git checkout -b feature/descriptive-name
Syncing with Main
git fetch origin
git rebase origin/main
git merge origin/main
Undoing Changes
git checkout -- path/to/file
git reset HEAD path/to/file
git reset --soft HEAD~1
git reset --hard HEAD~1
Viewing History
git log --oneline -10
git log --oneline -- path/to/file
git show <commit-hash>
git diff main..feature/my-branch
Protected Branches
Main Branch Protection
The main branch should have:
Bypass for Emergencies
In genuine emergencies:
- Document the emergency
- Use break-glass procedure if available
- Create follow-up PR for review
- Update CHANGELOG with emergency context
.gitignore Maintenance
When to Update
Add patterns when:
- New tool introduces local state files
- New secrets/credentials format appears
- Build artifacts change
Pattern Guidelines
# Be specific
.terraform/ # Good: specific directory
# Avoid overly broad patterns
* # Bad: ignores everything
# Comment sections
# -----------------------
# Terraform
# -----------------------
.terraform/
*.tfstate
Conflict Resolution
Prevention
- Keep branches short-lived
- Sync with main frequently
- Communicate about overlapping work
Resolution Process
git status
git add path/to/resolved/file
git rebase --continue
git commit
GitHub CLI Quick Reference
gh pr create --title "Title" --body "Description"
gh pr list
gh pr view 123
gh pr checkout 123
gh pr merge 123
gh issue create --title "Title" --body "Description"
Related Skills
documentation-standards — For documentation in commits/PRs
skill-designer — For creating new skills via Git workflow
command-designer — For creating new commands via Git workflow