Git workflow
Git-backed source of truth for reusable AI Agent Skills
npx -y skills add pbans-agent/skillpack --skill git-workflowAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Manages Git branching, committing, and collaboration workflows for multi-agent and solo projects. Use when the user asks to create branches, write commit messages, review staged changes, resolve merge conflicts, squash commits, rebase, cherry-pick, or follow conventional commit conventions.
SKILL.md
3.1 KB, as published. Nobody here has run it
Git Workflow
Purpose
Provide structured Git workflows for agents working on codebases. Ensure clean history, consistent commit messages, and safe collaboration.
When to Use
- Creating feature branches or bugfix branches
- Writing descriptive commit messages from diffs
- Reviewing staged or unstaged changes before committing
- Resolving merge or rebase conflicts
- Squashing or reorganizing commits
- Rebasing onto main or another branch
- Cherry-picking specific commits
- Setting up branch naming conventions
Workflow
Creating a Branch
git checkout main
git pull --ff-only
git checkout -b <type>/<short-description>
Branch types:
feat/— new featurefix/— bug fixdocs/— documentation changesrefactor/— code refactoringtest/— adding or updating testschore/— maintenance tasksagent/— agent-initiated changes
Writing Commit Messages
Use conventional commits:
<type>(<scope>): <imperative description>
[optional body with context]
[optional footer with breaking changes or refs]
Types: feat, fix, docs, style, refactor, test, chore, perf
Rules:
- Subject line ≤ 72 characters
- Use imperative mood: "add feature" not "added feature"
- Do not end subject with period
- Body explains WHY, not WHAT (diff shows WHAT)
- Reference issues/PRs in footer when applicable
Before Committing
git status— see what changedgit diff— review unstaged changesgit diff --staged— review staged changes- Stage purposefully:
git add -pfor selective staging - Write commit message that explains the intent
Merge Conflict Resolution
- Inspect the conflict markers in each file
- Understand what both sides were trying to do
- Preserve the intent of both changes where possible
- Never blindly choose "ours" or "theirs"
- Test after resolving: run validation, tests, linting
- Stage resolved files:
git add <resolved-files> - Continue:
git rebase --continueorgit commit
Squashing Commits
git rebase -i HEAD~<n>
# Mark commits to squash, keep the first as "pick"
# Write a clean combined commit message
Use squashing when:
- Multiple small commits should be one logical change
- Fixing typos or lint issues immediately after the original commit
- A feature branch has excessive "WIP" commits
Rebasing
git checkout <branch>
git fetch origin
git rebase origin/main
Rebase instead of merge to keep clean history on feature branches.
File References
- Commit Message Templates — templates for common commit types