Our review
Undoes the last commit while keeping changes staged for re-committing.
Strengths
- Allows fixing the commit message or adding missed files easily.
- Does not delete any changes, unlike a hard reset.
- Quick and straightforward one-command operation.
Limitations
- Only works for the most recent commit (HEAD~1).
- Does not affect untracked or unstaged changes.
- Can be problematic if the commit has already been pushed to a shared branch.
When you committed too early and need to adjust the commit message or include additional files.
If the commit has already been pushed to a shared remote, use `git commit --amend` or a revert instead.
Security analysis
SafeThe skill only uses 'git reset --soft HEAD~1', a standard git command that modifies local repository state. It does not execute arbitrary code, access sensitive files, or exfiltrate data. No destructive or obfuscated actions are present.
No concerns found
Examples
Undo my last commit but keep the changes staged so I can fix the commit message.I forgot to include a file in the last commit. Undo the commit and keep the changes staged so I can add the missing file.I accidentally committed too early. Use git reset --soft to undo the last commit and keep my changes staged.name: git-undo description: Undo the last commit while keeping changes staged. Use when you need to fix a commit message or add missing files. disable-model-invocation: true allowed-tools: Bash(git:*)
Git Undo
Undo the last commit but keep changes staged.
- Undo the last commit but keep the file changes in the staging area.
- Command:
git reset --soft HEAD~1 - This allows you to fix the commit message or add missing files before committing again.
- Command:
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.