{"id":13394451,"url":"https://github.com/motiz88/git-exec-and-restage","last_synced_at":"2025-06-21T08:35:22.998Z","repository":{"id":79369672,"uuid":"90875976","full_name":"motiz88/git-exec-and-restage","owner":"motiz88","description":"Safely amend Git commits after applying auto-fixing tools","archived":false,"fork":false,"pushed_at":"2018-05-20T09:50:05.000Z","size":237,"stargazers_count":17,"open_issues_count":6,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T07:53:14.509Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/motiz88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-05-10T14:50:22.000Z","updated_at":"2023-04-26T04:00:27.000Z","dependencies_parsed_at":"2023-03-27T16:16:26.063Z","dependency_job_id":null,"html_url":"https://github.com/motiz88/git-exec-and-restage","commit_stats":{"total_commits":28,"total_committers":4,"mean_commits":7.0,"dds":0.4642857142857143,"last_synced_commit":"14d4c8047772beef73f42b03dbea4b31df087222"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/motiz88/git-exec-and-restage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motiz88%2Fgit-exec-and-restage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motiz88%2Fgit-exec-and-restage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motiz88%2Fgit-exec-and-restage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motiz88%2Fgit-exec-and-restage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/motiz88","download_url":"https://codeload.github.com/motiz88/git-exec-and-restage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/motiz88%2Fgit-exec-and-restage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261094579,"owners_count":23108754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T17:01:20.140Z","updated_at":"2025-06-21T08:35:17.953Z","avatar_url":"https://github.com/motiz88.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# git-exec-and-restage\n\n[![npm](https://img.shields.io/npm/v/git-exec-and-restage.svg)](https://www.npmjs.com/package/git-exec-and-restage)\n[![Travis CI](https://img.shields.io/travis/motiz88/git-exec-and-restage/master.svg)](https://travis-ci.org/motiz88/git-exec-and-restage)\n[![Codecov](https://img.shields.io/codecov/c/github/motiz88/git-exec-and-restage/master.svg)](https://codecov.io/gh/motiz88/git-exec-and-restage/)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n\u003e Safely amend Git commits after applying auto-fixing tools\n\n`git-exec-and-restage` executes a command for you on a set of files. This\ncommand may modify the files (imagine a linter in auto-fix mode, like `prettier\n--write` or `eslint --fix`). If the files were fully staged before the command\nran, the changes will be automatically added to the Git index; if they were\n_partially_ changed the Git index will remain untouched.\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Contribute](#contribute)\n- [Acknowledgements](#acknowledgements)\n- [License](#license)\n\n## Install\n\n```sh\nnpm install git-exec-and-restage\n```\n\n## Usage\n\nManually e.g. with `prettier`:\n\n```sh\ngit-exec-and-restage prettier --write -- file1.js file2.js\n```\n\nAutomatically e.g. with `lint-staged`:\n\n### `package.json`\n\n```json\n{\n  \"scripts\": {\n    \"precommit\": \"lint-staged\"\n  },\n  \"lint-staged\": {\n    \"*.js\": [\"git-exec-and-restage eslint --fix --\"]\n  }\n}\n```\n\n## Contribute\n\nPRs welcome.\n\n## Acknowledgements\n\nThis package owes a great deal to Matthew Chase Whittemore's\n[`staged-git-files`](https://github.com/mcwhittemore/staged-git-files).\n\n## License\n\nMIT © Moti Zilberman\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmotiz88%2Fgit-exec-and-restage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmotiz88%2Fgit-exec-and-restage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmotiz88%2Fgit-exec-and-restage/lists"}