install
source · Clone the upstream repo
git clone https://github.com/sah1l/awesome-claude-code
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sah1l/awesome-claude-code "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/git-workflow" ~/.claude/skills/sah1l-awesome-claude-code-git-workflow && rm -rf "$T"
manifest:
.claude/skills/git-workflow/SKILL.mdsource content
Git Workflow
Why This Skill Exists
Git conventions prevent merge conflicts, lost work, and deployment accidents. These patterns scale from solo projects to large teams without adding ceremony.
Branch Naming
<type>/<ticket>-<short-description>
| Type | When |
|---|---|
| New feature |
| Bug fix |
| Code restructuring |
| Build, CI, dependencies |
| Documentation |
| Test additions/fixes |
Examples:
feat/AUTH-42-email-verificationfix/PAY-108-duplicate-chargechore/upgrade-node-22
Rules
- Lowercase, hyphen-separated
- Include ticket number when available
- Keep under 50 characters
- Branch from
(ormain
if using gitflow)develop
Merge Strategy
Squash merge to main — keeps main history clean, each commit = one feature/fix.
# On GitHub: "Squash and merge" button # Locally: git checkout main git merge --squash feat/AUTH-42-email-verification git commit # write a clean summary
Exception: For large features with meaningful internal commits, use a regular merge to preserve history.
Pull Request Template
## What <!-- One-liner: what does this PR do? --> ## Why <!-- What problem does it solve? Link to issue/ticket. --> ## How <!-- Brief description of the approach. Highlight non-obvious decisions. --> ## Testing - [ ] Unit tests pass - [ ] Integration tests pass - [ ] Manual testing done (describe scenario) ## Screenshots <!-- If UI changes, before/after screenshots -->
Commit Hygiene
- Commit early, commit often on feature branches
- Squash before merge to main
- Never commit:
, credentials, large binaries, build artifacts.env - See commit skill for message format
Conflict Resolution
git fetch origin main
(for feature branches)git rebase origin/main- Resolve conflicts, maintaining the intent of both changes
git rebase --continue- Force-push feature branch only:
git push --force-with-lease
Never force-push to main/develop/release branches.