Git Workflow Commands

VerifiedCaution

Git commands for branching, committing, merging, pushing, rebasing, and squashing.

Sby Skills Guide Bot
DevelopmentIntermediate
7/23/2026
Claude Code
#git#version-control#branching#commit-workflow#rebase

Recommended for

Automated summary

This skill bundles common Git operations (branch from a ticket, commit, squash, merge, push, rebase) behind a single subcommand-style interface.

Strengths

  • Single subcommand interface (branch, commit, merge, push, rebase) with documented defaults such as merging or rebasing onto main
  • Explicit safety gates: commit, merge, push, rebase and reset require developer confirmation unless -y/--yes is passed
  • Forbids bypassing hooks (--no-verify) and warns against force-pushing to main/master
  • Routes each subcommand to a dedicated instruction file, keeping the entry point readable

Limitations

  • The actual step-by-step logic lives in referenced files (branch.md, commit.md, merge.md, etc.) not included here, so detailed behavior can't be verified
  • Branch creation from an issue depends on an external issue tracker skill or MCP tool that is not provided
  • Requires an assistant that supports skills with command arguments, such as Claude Code
When to use it

Use it when a developer wants to move quickly through standard Git operations like creating a branch from a ticket, committing, merging or rebasing without retyping commands.

When not to use it

Avoid it for advanced or destructive history work it doesn't cover, such as complex history rewriting, fine-grained manual conflict resolution, or submodule management.

Security analysis

Caution
Quality score85/100

This is a legitimate git workflow skill with sensible safety rules, including confirmation gates and a prohibition on force-pushing to main. The risk is moderate because it can perform powerful repository changes and remote pushes, and the `-y` flag can skip confirmations, but there is no evidence of destructive commands, secret exfiltration, obfuscation, or safety-disabling behavior.

Findings
  • •Runs repository-mutating git operations such as commit, merge, rebase, push, and soft reset
  • •The `-y/--yes` flag bypasses confirmation gates for critical git actions
  • •Delegates behavior to referenced files (`branch.md`, `commit.md`, etc.) that are not included in the provided SKILL.md
How this analysis is made

Examples

Branch from issue
/git branch 42
Commit staged changes
/git commit
Rebase onto main without prompts
/git rebase main -y

name: git description: Git commands for branching, committing, merging, pushing, rebasing, and squashing. Use when developer needs to create branches, commit changes, push, merge or rebase branches, or squash commits. user-invocable: true argument-hint: "branch [create]|commit [squash]|merge|push|rebase [args] [-y]" context: fork license: MIT compatibility: "Any AI coding assistant that supports skills (Claude Code, Open Code, etc.)" metadata: author: supa-magic version: 2.0.0 category: development tags: [git, version-control, branching, commits, workflow]

/git $ARGUMENTS

Git workflow commands.

Usage

/git
    branch create [issue]  Create branch from issue tracker ticket
    commit create         Smart commit with auto-grouping (create can be omitted)
    commit squash         Squash all branch commits into clean commit(s)
    merge [branch]        Merge branch into current (default: main)
    push                  Validate commits and push to remote
    rebase [branch]       Rebase current branch onto another (default: main)

    -y, --yes             Skip confirmations

| Argument | Format | Default | Effect | |----------|--------|---------|--------| | command | Positional (1st token) | — | Which subcommand to run | | args | Positional (remaining tokens) | — | Passed to the subcommand (e.g., issue number, branch name) | | -y, --yes | Flag | false | Skip all confirmation gates |

Rules

These rules apply to ALL git operations — main thread and all agents.

  • Critical git actions (commit, merge, push, rebase, reset) require developer confirmation unless -y was passed
  • Never skip hooks (--no-verify, --no-gpg-sign) unless explicitly requested
  • Never use git push --force to main/master — warn user if requested

Instructions

Step 1: Parse Arguments

Extract from $ARGUMENTS:

  1. First non-flag token → command (one of: branch, commit, merge, push, rebase)
  2. If command is branch: next token may be a subcommand (create). If omitted or if the next token looks like an issue number, default to create
  3. If command is commit: next token may be a subcommand (create or squash). If omitted, default to create
  4. Remaining non-flag tokens → passed to the subcommand as positional args
  5. -y or --yes anywhere → skip all confirmation gates

If no command is provided, list the available commands and ask the developer which one to run.

If the command is not recognized, show:

Unknown command <command>. Available commands: branch, commit, merge, push, rebase.

Step 2: Route to Subcommand

Read the command-specific instruction file and follow it exactly:

  • branch create → Read branch.md and follow all steps
  • commit create → Read commit.md and follow all steps
  • commit squash → Read commit-squash.md and follow all steps
  • merge → Read merge.md and follow all steps
  • push → Read push.md and follow all steps
  • rebase → Read rebase.md and follow all steps

Examples

Example 1: Create a branch from an issue

User says: /git branch 42 (or /git branch create 42)

Actions:

  1. Fetch ticket #42 from the project's issue tracker using the appropriate skill or MCP tool
  2. Determine branch type from labels (e.g., enhancement → feature/)
  3. Generate branch name: feature/42/add-user-auth
  4. Create and switch to branch

Result: Switched to a new branch 'feature/42/add-user-auth'

Example 2: Commit staged changes

User says: /git commit

Actions:

  1. Verify branch naming convention
  2. Detect staged files
  3. Analyze changes and draft commit message
  4. Show planned commit for confirmation
  5. Create commit

Result: [feature/42/add-user-auth abc1234] feat(auth): add login endpoint

Example 3: Push branch to remote

User says: /git push

Actions:

  1. Verify not on main
  2. List branch commits
  3. Validate commit messages (no WIP, no Co-Authored-By)
  4. Confirm push with developer
  5. Push to remote

Result: Pushed 3 commit(s) to origin/feature/42/add-user-auth

Example 4: Squash branch commits before PR

User says: /git commit squash

Actions:

  1. Verify not on main, working tree is clean
  2. Find merge-base and list 5 branch commits
  3. Confirm squash with developer
  4. Soft reset to base, unstage all files
  5. Invoke /git commit to create clean commit(s)

Result: 5 commits squashed into 1 clean commit

Troubleshooting

Error: Uncommitted changes block operation

Cause: Merge, rebase, or squash requires a clean working tree but there are unstaged changes. Solution: Ask the developer to commit or stash changes first. Do not auto-stash without permission.

Error: Wrong branch

Cause: Developer is on main/master and tries to squash or commit branch-specific changes. Solution: Warn that the operation targets the current branch. Ask the developer to switch to the correct branch first.

Error: No changes to commit

Cause: git status shows no staged or unstaged changes. Solution: Inform the developer there is nothing to commit. Do not create empty commits.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/git-workflow-commands-mrx3xy6g/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/git-workflow-commands-mrx3xy6g' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-workflow-commands-mrx3xy6g/download' --output '.skill-downloads/git-workflow-commands-mrx3xy6g/SKILL.md.part' && mv '.skill-downloads/git-workflow-commands-mrx3xy6g/SKILL.md.part' '.skill-downloads/git-workflow-commands-mrx3xy6g/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Environment declared by the author: Any AI coding assistant that supports skills (Claude Code, Open Code, etc.)

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/git-workflow-commands-mrx3xy6g/SKILL.md' && test -s '.skill-downloads/git-workflow-commands-mrx3xy6g/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/git' && cp -R '.skill-downloads/git-workflow-commands-mrx3xy6g' '.claude/skills/git'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/git-workflow-commands-mrx3xy6g'

openskills read 'git-workflow-commands-mrx3xy6g'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/git-workflow-commands-mrx3xy6g/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills