Git workflow

From VenTheZone/pi-dots · View interactive version

Git workflow is an AI agent skill from the GitHub repository VenTheZone/pi-dots. Git workflow assistant for branching, commits, PRs, and conflict resolution. Use when user asks about git strategy, branch management, or PR workflow.

How to use this skill

Skill file

Git Workflow

Help with Git operations and workflow best practices.

Capabilities

Branch Strategy

# Check current state
git branch -a
git log --oneline -20
git status

Recommend branching strategy based on project:

Commit Messages

Follow Conventional Commits:

feat(scope): add new feature
fix(scope): fix bug description
refactor(scope): restructure code
docs(scope): update documentation
test(scope): add/update tests
chore(scope): maintenance tasks

PR Workflow

  1. git diff main --stat — Review changes
  2. Generate PR title and description
  3. Suggest reviewers based on changed files (git log --format='%an' -- <files>)

PR link in summaries

When a PR has been opened, always include the full GitHub PR URL in any summary or status update you provide. This makes it easy for the user to click through to the PR directly.

Example summary format:

PR: https://github.com/owner/repo/pull/42

Use gh pr view --json url --jq .url to retrieve the URL if you do not already have it.

Non-interactive safety for agent-run Git/GitHub commands

When the agent runs git or gh, avoid opening an interactive editor or prompt.

A lot of Git entrypoints use different editor config keys, so avoid surprises by disabling both:

Use this pattern for non-interactive flows:

GIT_EDITOR=true GIT_SEQUENCE_EDITOR=true git -c core.editor=true -c sequence.editor=true rebase --continue

```bash

git commit -m "fix(scope): message"

```

```bash

git merge --no-edit

```

```bash

GH_PROMPT_DISABLED=1 gh pr create --title "..." --body "..."

GH_PROMPT_DISABLED=1 gh pr merge --squash --delete-branch

```

Conflict Resolution

  1. git diff --name-only --diff-filter=U — Find conflicted files
  2. Read each conflicted file
  3. Understand both sides of the conflict
  4. Resolve with minimal changes preserving intent from both sides

Interactive Rebase

Guide through git rebase -i for cleaning up history before PR.

If the agent is resolving conflicts during a rebase, continue with a non-interactive command such as:

GIT_EDITOR=true GIT_SEQUENCE_EDITOR=true git -c core.editor=true -c sequence.editor=true rebase --continue
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.