
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
git-exec-and-restage
Advanced tools
Safely amend Git commits after applying auto-fixing tools
git-exec-and-restage executes a command for you on a set of files. This
command may modify the files (imagine a linter in auto-fix mode, like prettier --write or eslint --fix). If the files were fully staged before the command
ran, the changes will be automatically added to the Git index; if they were
partially changed the Git index will remain untouched.
npm install git-exec-and-restage
Manually e.g. with prettier:
git-exec-and-restage prettier --write -- file1.js file2.js
Automatically e.g. with lint-staged:
package.json{
"scripts": {
"precommit": "lint-staged"
},
"lint-staged": {
"*.js": ["git-exec-and-restage eslint --fix --"]
}
}
PRs welcome.
This package owes a great deal to Matthew Chase Whittemore's
staged-git-files.
MIT © Moti Zilberman
FAQs
Safely amend Git commits after applying auto-fixing tools
We found that git-exec-and-restage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.