EasyReset helps you replace a run of recent commits with one clean commit.
- Open the EasyReset icon in VS Code's Activity Bar.
- Search commits by message or ID, or use Show 5 more to browse beyond the five most recent commits shown by default.
- Select one or more commits, starting with the current
HEADcommit and continuing without gaps. - Click Reset selected commits and confirm. EasyReset writes a combined patch to
.git/easyreset/and hard-resets the branch to the commit before your selection. - Click Restore changes for new commit. The combined changes are restored and staged, ready for you to review and commit as one commit in Source Control.
- If the original commits were already on GitHub, click Force push rewritten history after committing. This uses
git push --force-with-lease.
- Your working tree must be clean before reset or restoration.
- Selected commits must be a continuous range from
HEAD. Rewriting arbitrary commits can change other commits and is intentionally not automated. - The initial commit cannot be selected, because it has no parent for EasyReset to reset the branch to.
- The extension saves the patch before running
git reset --hard, so it can restore the selected changes. Do not delete.git/easyreset/before restoring. - Rewriting shared history affects collaborators. Coordinate before force-pushing.
npm install
npm run compile
# Press F5 in VS Code to launch an Extension Development Host.
# Or build an installable extension package:
npx @vscode/vsce package
code --install-extension easyreset-0.1.4.vsixAfter installing a .vsix, reload VS Code when prompted. You can then open EasyReset from the Activity Bar.