agentleFS
harrissohail6harrissohail6/claude-code-config/skills/git-workflow/SKILL.md

git-workflow

Skill1 starsChanged 11 months agoMITView on GitHub

Git workflow patterns and best practices. Use when managing branches, commits, and collaboration workflows.

  • Reads credentials
  • Commits and pushes

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 163 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when working with Git for version control and collaboration.

    line 8

“Common” is measured: kept by at least 6 in 10 of the 163 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Git Workflow

Use this skill when working with Git for version control and collaboration.

Branch Naming Convention

feature/   - New features          (feature/user-authentication)
bugfix/    - Bug fixes             (bugfix/login-redirect)
hotfix/    - Urgent production fix (hotfix/security-patch)
release/   - Release preparation   (release/v2.1.0)
chore/     - Maintenance           (chore/update-dependencies)
docs/      - Documentation         (docs/api-reference)

Commit Message Format

<type>(<scope>): <subject>

<body>

<footer>

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • style: Formatting (no code change)
  • refactor: Code restructuring
  • test: Adding tests
  • chore: Maintenance

Examples

feat(auth): add OAuth2 login support

Implement Google and GitHub OAuth providers.
Includes token refresh handling.

Closes #123
fix(cart): resolve race condition in checkout

The cart total was calculated before items
were fully loaded, causing incorrect totals.

Workflow Patterns

Feature Branch Workflow

# Start feature
git checkout main
git pull origin main
git checkout -b feature/new-feature

# Work and commit
git add .
git commit -m "feat: implement feature"

# Stay updated
git fetch origin
git rebase origin/main

# Push and create PR
git push -u origin feature/new-feature

Rebase vs Merge

# Rebase: Linear history (preferred for feature branches)
git checkout feature/my-feature
git rebase main

# Merge: Preserves branch history
git checkout main
git merge --no-ff feature/my-feature

Common Operations

Undo Last Commit (keep changes)

git reset --soft HEAD~1

Amend Last Commit

git add forgotten-file.js
git commit --amend --no-edit

Interactive Rebase (clean up commits)

git rebase -i HEAD~5

# Commands:
# pick   - use commit
# squash - combine with previous
# reword - change message
# drop   - remove commit

Cherry Pick

git cherry-pick abc123

Stash Changes

git stash push -m "WIP: feature"
git stash list
git stash pop

Pull Request Checklist

Before creating PR:

  • Branch is up to date with main
  • All tests pass
  • Code is linted/formatted
  • Commits are clean and logical
  • No debug code or console.logs
  • Documentation updated if needed

PR Description:

## Summary
Brief description of changes

## Changes
- Added X
- Fixed Y
- Updated Z

## Testing
How to test these changes

## Screenshots (if UI)
Before/after images

Gitignore Essentials

# Dependencies
node_modules/
venv/
vendor/

# Build
dist/
build/
*.pyc

# Environment
.env
.env.local
*.env

# IDE
.vscode/
.idea/
*.swp

# OS
.DS_Store
Thumbs.db

# Logs
*.log
logs/

Hooks (Pre-commit)

# .git/hooks/pre-commit
#!/bin/sh
npm run lint
npm test

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.