What problem does it solve?
This Skill provides granular control over Git operations at the hunk level, allowing for precise staging, unstaging, discarding, and even splitting of commits without affecting entire files.
Core Features & Use Cases
- Hunk-level Staging/Unstaging: Selectively stage or unstage specific hunks of changes within a file.
- Discarding Changes: Discard specific hunks from your working directory.
- Commit Splitting & Rewording: Split existing commits into new ones or reword them with fine-grained control.
- Undoing Changes: Undo specific hunks from a given commit, reverting them to the working tree.
- Use Case: You've made several unrelated changes in one file and only want to commit a subset of them.
git-surgeon allows you to precisely select and stage only the desired hunks for your commit.
Quick Start
Use git-surgeon to stage hunks with IDs 123 and 456.