# Reset Unpushed Commits

Reset selected unpushed commits back into the working tree for re-committing through `/wrap-up` or `/yolo`.

**Canonical URL:** https://skillshunter.net/skills/discovered-cd184fdd8ff9ef3d4651b94cecc289acdb847a8e5b359eec

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-cd184fdd8ff9ef3d4651b94cecc289acdb847a8e5b359eec

**Markdown URL:** https://skillshunter.net/skills/discovered-cd184fdd8ff9ef3d4651b94cecc289acdb847a8e5b359eec.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-cd184fdd8ff9ef3d4651b94cecc289acdb847a8e5b359eec/download

**Category:** Software & Development

**Source URL:** https://github.com/AnotherSava/claude-code-common/blob/1a7f9f9cce53f6946ae1e3a9cc0733f2524a4b93/claude/skills/reset/SKILL.md

**Source commit:** 1a7f9f9cce53f6946ae1e3a9cc0733f2524a4b93

**Listing approved at:** 2026-12-01

**Created at:** 2026-11-30T08:08:34.000000Z

**Updated at:** 2026-12-01T12:48:20.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before proceeding, ensure that you are on the correct branch and that no changes have been pushed. The process will reset selected unpushed commits back into the working tree, allowing them to be re-committed.

### When to use it

- Resetting unpushed commits to re-commit with changes
- Preparing unpushed commits for review or rework before pushing

## Skill instructions

---
name: reset
description: Soft-reset unpushed commits back into the working tree for re-committing
allowed-tools: AskUserQuestion, Bash(git log:*), Bash(git reset:*), Bash(git rev-parse:*), Bash(git status:*)
---

# Reset Unpushed Commits

Soft-reset selected unpushed commits back into the working tree so they can be re-committed through `/wrap-up`, or through `/yolo` to push them as they are.

Read `~/.claude/skills/shared/bash-rules.md` for bash command constraints.

## Context
- Unpushed commits: !`git log @{upstream}..HEAD --format="%h %ai %s" 2>/dev/null || git log origin/master..HEAD --format="%h %ai %s" 2>/dev/null`
- Working tree status: !`git status --short`

## Process

1. If **Unpushed commits** is empty, tell the user there is nothing to reset and stop.

2. **Present options** — always show each commit with its hash, timestamp, and message. Format timestamps from **Unpushed commits** as `Mon DD, HH:MM`. List in **descending** order (most recent first).

   > There are **N** unpushed commit(s) on this branch. Which commits should I reset?
   > 0. Don't reset — keep all commits as-is
   > 1. `Jun 17, 19:13 abc1234 commit message` — this commit only
   > 2. `Jun 17, 18:45 def5678 commit message` — this + all above
   > ...
   > N. `Jun 17, 17:00 ghi9012 commit message` — reset all unpushed commits

   With a single commit, show options 0 and 1 only (option 1 shows the commit details).

   - **Smart default:** If the most recent unpushed commits form a contiguous run of `fix: address code review findings`, the default (bare Enter) resets all of them (stopping before the first commit with a different message). Otherwise, the default is the most recent commit only.

3. If the user selects **0**, skip the reset and go straight to step 4.

4. **Execute on confirmation:**
   ```
   git reset <chosen-commit>~
   ```
   This is a soft reset to the parent of the chosen commit, putting all changes back into the working tree.

5. **Report result** — show the new working tree status:
   ```
   git status --short
   ```
   Tell the user they can now run `/wrap-up` (or `/yolo`) to re-commit the changes.

## Out of scope
- Do NOT create commits — that is `/wrap-up`'s or `/yolo`'s job
- Do NOT push
- Do NOT switch branches

