{"data":{"slug":"discovered-cd184fdd8ff9ef3d4651b94cecc289acdb847a8e5b359eec","title":"Reset Unpushed Commits","summary":"Reset selected unpushed commits back into the working tree for re-committing through `\/wrap-up` or `\/yolo`.","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","download_url":"https:\/\/skillshunter.net\/skills\/discovered-cd184fdd8ff9ef3d4651b94cecc289acdb847a8e5b359eec\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_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.","instructions":"---\nname: reset\ndescription: Soft-reset unpushed commits back into the working tree for re-committing\nallowed-tools: AskUserQuestion, Bash(git log:*), Bash(git reset:*), Bash(git rev-parse:*), Bash(git status:*)\n---\n\n# Reset Unpushed Commits\n\nSoft-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.\n\nRead `~\/.claude\/skills\/shared\/bash-rules.md` for bash command constraints.\n\n## Context\n- 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`\n- Working tree status: !`git status --short`\n\n## Process\n\n1. If **Unpushed commits** is empty, tell the user there is nothing to reset and stop.\n\n2. **Present options** \u2014 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).\n\n   > There are **N** unpushed commit(s) on this branch. Which commits should I reset?\n   > 0. Don't reset \u2014 keep all commits as-is\n   > 1. `Jun 17, 19:13 abc1234 commit message` \u2014 this commit only\n   > 2. `Jun 17, 18:45 def5678 commit message` \u2014 this + all above\n   > ...\n   > N. `Jun 17, 17:00 ghi9012 commit message` \u2014 reset all unpushed commits\n\n   With a single commit, show options 0 and 1 only (option 1 shows the commit details).\n\n   - **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.\n\n3. If the user selects **0**, skip the reset and go straight to step 4.\n\n4. **Execute on confirmation:**\n   ```\n   git reset <chosen-commit>~\n   ```\n   This is a soft reset to the parent of the chosen commit, putting all changes back into the working tree.\n\n5. **Report result** \u2014 show the new working tree status:\n   ```\n   git status --short\n   ```\n   Tell the user they can now run `\/wrap-up` (or `\/yolo`) to re-commit the changes.\n\n## Out of scope\n- Do NOT create commits \u2014 that is `\/wrap-up`'s or `\/yolo`'s job\n- Do NOT push\n- Do NOT switch branches\n","use_cases":["Resetting unpushed commits to re-commit with changes","Preparing unpushed commits for review or rework before pushing"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/AnotherSava\/claude-code-common\/blob\/1a7f9f9cce53f6946ae1e3a9cc0733f2524a4b93\/claude\/skills\/reset\/SKILL.md","source_commit":"1a7f9f9cce53f6946ae1e3a9cc0733f2524a4b93","license":null,"version":null,"listing_approved_at":"2026-12-01","created_at":"2026-11-30T08:08:34.000000Z","updated_at":"2026-12-01T12:48:20.000000Z","seo_title":"Reset Unpushed Commits in Git","seo_description":"Reset unpushed commits back into the working tree for re-committing using Git commands.","seo_keywords":["git reset","unpushed commits","re-commit","git workflow","reset commits"]}}