{"id":29353612,"url":"https://github.com/thomasbachem/git-edit","last_synced_at":"2026-05-06T01:35:22.132Z","repository":{"id":303349919,"uuid":"1015115502","full_name":"thomasbachem/git-edit","owner":"thomasbachem","description":"Easily edit Git commits via interactive rebase","archived":false,"fork":false,"pushed_at":"2025-08-10T18:49:58.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-12T06:32:09.698Z","etag":null,"topics":["command-line","git","rebase","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasbachem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-07T03:08:29.000Z","updated_at":"2025-08-10T18:50:01.000Z","dependencies_parsed_at":"2025-07-14T18:26:57.436Z","dependency_job_id":"cef3c883-ed04-4c86-bbcf-d08ac42cec0f","html_url":"https://github.com/thomasbachem/git-edit","commit_stats":null,"previous_names":["thomasbachem/git-edit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thomasbachem/git-edit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbachem%2Fgit-edit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbachem%2Fgit-edit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbachem%2Fgit-edit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbachem%2Fgit-edit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasbachem","download_url":"https://codeload.github.com/thomasbachem/git-edit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasbachem%2Fgit-edit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281003915,"owners_count":26428018,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["command-line","git","rebase","zsh"],"created_at":"2025-07-09T02:02:29.749Z","updated_at":"2026-05-06T01:35:22.125Z","avatar_url":"https://github.com/thomasbachem.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git edit – Easily edit commits via interactive rebase\n\nThis Git subcommand script makes it easy to edit, modify, drop, or merge previous commits. It's essentially a more convenient wrapper around `git rebase --interactive`, with automatic stashing/unstashing and integrated merge conflict handling.\n\n## Usage\n\n```\ngit-edit [-m | --message] \u003ccommit\u003e\ngit-edit [-d | --drop | -s | --squash] \u003ccommit\u003e...\n\nMODES:\n-e, --edit                      Edit \u003ccommit\u003e (default mode)\n-d, --drop                      Delete (drop) one or more \u003ccommit\u003es or ranges\n-s, --squash                    Merge (fixup/squash) one or more \u003ccommit\u003es into the oldest one\n-s \u003ctarget\u003e, --squash \u003ctarget\u003e  Merge (fixup/squash) \u003ccommit\u003es into \u003ctarget\u003e\n                                – also assumed when multiple commits are supplied\nFLAGS:\n-m, --message                   Alter \u003ccommit\u003e message after applying changes\n```\n*Tip:* Mode and flags can be given in any order.\n\n## Usage Examples\n\n### Editing\n\nOpen the given commit for manual editing, keeping its commit message (or add `-m` to also edit the message):\n```\ngit edit 0123456789abcdef0123456789abcdef01234567\n```\nThis will:\n1. Stash any current local changes\n2. Reset to the chosen commit\n3. **Pause so you can make changes**\n4. Amend the commit and continue the rebase (pausing if merge conflicts occur so you can resolve them)\n5. Restore your stashed changes\n\n### Merging\n\nMerge multiple commits into the oldest one among them, keeping only the target commit's message (or add `-m` to also edit the message):\n```\ngit edit 0123456789abcdef0123456789abcdef01234567 abcdef0123456789abcdef0123456789abcdef01\n```\n*Note:* You can also use ranges (e.g., `git edit HEAD~3..HEAD`).\n\nThis will:\n1. Stash any current local changes\n2. Determine the oldest of the provided commits, making it the target\n3. **Merge the newer commits into it**\n4. Continue the rebase (pausing if merge conflicts occur so you can resolve them)\n5. Restore your stashed changes\n\n## Screenshot\n\n![Screenshot](/screenshot.png?raw=true)\n\n## Installation\n\nMake the script available as a Git command by adding its folder to your `PATH`, e.g. by adding this line to `~/.zshrc`:\n```\nexport PATH=\"$PATH:/your/path/to/git-edit\"\n```\n\n## ⚠ Warning: History Rewriting\n\nThis script rewrites Git history from the chosen commit onward — changing the SHA-1 of that commit and all later commits.\n- Safe if: Commits haven’t been pushed yet, or you’re the only developer\n- Risky if: Others have based work on these commits (branches, forks, etc.)\nIf rewriting history, you’ll need to force-push (`git push --force`), which can disrupt collaborators.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasbachem%2Fgit-edit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasbachem%2Fgit-edit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasbachem%2Fgit-edit/lists"}