Skip to content
Agentmart
Submit a tool

git-operations

Common git workflows for committing, branching, rebasing, conflict resolution, and undoing mistakes.

Skill by Nomadcxx

IndexedBSD-3-Clause★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/nomadcxx-git-operations

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Common git workflows for committing, branching, rebasing, conflict resolution, and undoing mistakes. Use when asked to perform git operations or when about to commit or push code.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/git-operations

What's inside

Skill name
git-operations
Description
Common git workflows for committing, branching, rebasing, conflict resolution, and undoing mistakes. Use when asked to perform git operations or when about to commit or push code.
License
BSD-3-Clause
Instructions
53 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

## Git Operations

Follow consistent workflows. Always check `git diff --staged` before committing.

### Commit Message Format

Use conventional commits: `type(scope): subject`

Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `build`, `ci`

Subject: imperative mood, no period, max 72 chars. Body: wrap at 72 chars, explain why not what.

### Amend vs New Commit

Amend only if the commit has not been pushed to a shared branch. After push, always create a new commit. Amending pushed commits forces others to rebase.

### Branching Strategy

Feature branches: `feat/<slug>`. Bug fix branches: `fix/<slug>`. Keep branches short-lived. Merge or rebase into main frequently. Delete branches after merge.

### Rebase vs Merge

Rebase for keeping a clean linear history on feature branches before PR. Merge for integrating into main (preserves topology). Never rebase a shared branch that others have checked out.

### Resolving Conflicts

Read both sides before choosing. `ours` means the current branch; `theirs` means the incoming branch. If unsure which is correct, ask — do not guess. After resolving, `git add` the file and continue the rebase or merge.

### Undoing Mistakes

- `git restore <file>`: discard unstaged changes
- `git reset HEAD <file>`: unstage without discarding
- `git reset --soft HEAD~1`: undo last commit, keep changes staged
- `git reset --hard` destroys work — confirm before using
- `git revert <hash>`: safe undo for pushed commits

### Stash Usage

`git stash` when you need to switch context mid-work. `git stash pop` to restore. Name stashes: `git stash save "wip: description"`. List with `git stash list`.

### Cherry-Pick

Use to port a specific commit to another branch: `git cherry-pick <hash>`. Use sparingly; prefer rebase for sequential commits. If the cherry-pick produces conflicts, resolve them the same way as merge conflicts.

### PR Hygiene

Squash noise commits before opening a PR. Ensure the PR description explains the why, not just the what. Link to the issue. Keep PRs small — one concern per PR.

### Check Before Committing

Always run `git diff --staged` before `git commit` to confirm exactly what is going into the commit.

From Nomadcxx/smolbot, BSD-3-Clause.

More from Nomadcxx/smolbot

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Mar 31, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
BSD-3-Clause
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Nomadcxx

Cite this page

git-operations skill. Agent Mart. https://agentmart.dev/skills/nomadcxx-git-operations (last updated 2026-10-24)