{"id":19978744,"url":"https://github.com/s3rvac/git-edit-index","last_synced_at":"2025-05-04T04:32:03.323Z","repository":{"id":32536835,"uuid":"36118679","full_name":"s3rvac/git-edit-index","owner":"s3rvac","description":"A git command that opens an editor to stage or unstage files","archived":false,"fork":false,"pushed_at":"2025-04-01T17:15:21.000Z","size":160,"stargazers_count":9,"open_issues_count":6,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-08T03:02:17.944Z","etag":null,"topics":["git","index","python","staging","unstaging"],"latest_commit_sha":null,"homepage":"","language":"Python","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/s3rvac.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-23T10:40:57.000Z","updated_at":"2025-04-01T17:15:24.000Z","dependencies_parsed_at":"2024-11-13T03:45:33.963Z","dependency_job_id":null,"html_url":"https://github.com/s3rvac/git-edit-index","commit_stats":{"total_commits":146,"total_committers":2,"mean_commits":73.0,"dds":"0.013698630136986356","last_synced_commit":"2c1b5c09726f104b708831562e120560d98719cf"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rvac%2Fgit-edit-index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rvac%2Fgit-edit-index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rvac%2Fgit-edit-index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rvac%2Fgit-edit-index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s3rvac","download_url":"https://codeload.github.com/s3rvac/git-edit-index/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252288912,"owners_count":21724323,"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":["git","index","python","staging","unstaging"],"created_at":"2024-11-13T03:35:10.915Z","updated_at":"2025-05-04T04:31:58.314Z","avatar_url":"https://github.com/s3rvac.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"git-edit-index\n==============\n\n[![Build Status](https://github.com/s3rvac/git-edit-index/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/s3rvac/git-edit-index/actions/workflows/tests.yml?query=branch%3Amaster)\n[![Coverage Status](https://coveralls.io/repos/github/s3rvac/git-edit-index/badge.svg?branch=master)](https://coveralls.io/github/s3rvac/git-edit-index?branch=master)\n[![PyPI Version](https://badge.fury.io/py/git-edit-index.svg)](https://pypi.python.org/pypi/git-edit-index)\n\nThis command represents a faster alternative to `git add -i` or `git gui`. It\nallows you to stage or unstage files from the index in an editor, just like\nwhen you perform an interactive rebase.\n\n![Screencast](resources/screencast.gif \"git-edit-index in action\")\n\nFor example, let's assume you have the following three modified files (`git\nstatus --short`):\n\n    M path/to/file1\n    M another/path/to/file2\n    M yet/another/path/to/file3\n\nAfter running `git edit-index`, an editor will show up with the above output.\nTo stage (add) the first two files, simply change the text to\n\n    A path/to/file1\n    A another/path/to/file2\n    M yet/another/path/to/file3\n\nYou can also unstage (`reset`) files, add only parts of files (`add -p`), or\ndelete files (`rm`).\n\nRequirements\n------------\n\nThe script requires Python 2.7 or Python \u003e= 3.8. Both CPython and PyPy\nimplementations are supported.\n\nNote: The script might work even in older Python 3 releases, but this is not\nguaranteed.\n\nInstallation\n------------\n\nEither install the script from [Python Package\nIndex](https://pypi.python.org/pypi/git-edit-index) (PyPI) with\n[pip](http://www.pip-installer.org/):\n\n    $ pip install git-edit-index\n\nor install it manually by performing the following two steps:\n* Put the\n  [`git-edit-index`](https://raw.githubusercontent.com/s3rvac/git-edit-index/master/git-edit-index)\n  script to a directory that is in your `$PATH`.\n* Ensure that the script is executable (`chmod a+x git-edit-index`).\n\nUsage\n-----\n\nRun `git edit-index` to display an editor with the current index. In it, you\ncan stage or unstage files from the index simply by changing their status:\n\n* To stage a modified or deleted file, change its status from `M` or `D` to\n  `A`. This runs `git add FILE`. If you use `P` instead of `A`, it will run\n  `git add -p FILE` instead.\n* To unstage a modified file, change its status from `A` to `M`. This runs `git\n  reset FILE`.\n* To unstage a deleted file, change its status from `A` to `D`. This also runs\n  `git reset FILE`. If you use `P` instead of `D`, it will run `git reset -p\n  FILE` instead.\n* To add an untracked file, change its status from `?` to `A`. This runs `git\n  add FILE`.\n* To stop tracking of a file, change its status to `?`. This runs `git rm\n  --cached FILE`.\n* To add an ignored file, change its status from `!` to `A`. This runs `git add\n  -f FILE`.\n* To delete an untracked or ignored file, remove the line with the file. This\n  deletes the file by using the operating system's file-deletion facilities.\n* To revert changes done to a file since the last commit, remove the line with\n  the file. This runs `git checkout FILE` (if the file is staged, it first runs\n  `git reset FILE`).\n\nThe status is case-insensitive, e.g. both `A` and `a` stage the given file\n(lower-case letters are easier to type).\n\nAs with `git status`, ignored files aren't being shown by default,\ninstead the flag `--ignored` has to be set.\n\nSelecting an Editor\n-------------------\n\nThe editor can be specified either by setting\n[core.editor](http://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#Basic-Client-Configuration)\nin your Git config:\n\n    git config --global core.editor \"gvim -f\"\n\nor by setting the `EDITOR`, `VISUAL`, or `GIT_EDITOR` environment variable in\nyour shell:\n\n    export EDITOR=\"gvim -f\"\n\nSee the VARIABLES section in the [manual pages for\n`git-var`](http://git-scm.com/docs/git-var) for the used order of preference.\n\nUsing an Alias\n--------------\n\nOf course, instead of typing `git edit-index`, you can setup a [git\nalias](https://git-scm.com/book/tr/v2/Git-Basics-Git-Aliases):\n\n    git config --global alias.ei edit-index\n\nThen, all you have to do is to type \u003ccode\u003egit ei\u003c/code\u003e.\n\nConfiguration Options\n---------------------\n\nThe command supports the following configuration options via [Git's\nconfiguration\nsystem](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration).\n\n### git-edit-index.onEmptyBuffer [ask|act|nothing]\n\nWhat should be done when the editor buffer is empty (i.e. all lines were\ndeleted). Possible values:\n* `ask`: Ask the user by showing him or her a `y/N` prompt. This is the default\n  behavior of the command since version `0.5`.\n* `act`: Reflect the changes, without asking. This was the default behavior of\n  the command until version `0.5`.\n* `nothing`: Do not reflect any changes, without asking. This corresponds to\n  the default behavior of many other Git commands.\n\nDefault: **ask**.\n\nLimitations\n-----------\n\n* Only the following statuses are currently supported:\n\n  * `A`: Added file (staged).\n  * `D`: Deleted file (not staged).\n  * `M`: Modified file (not staged).\n  * `?`: Untracked file.\n  * `!`: Ignored file.\n\n* Working with files having merge conflicts (status `U`,\n  [#5](https://github.com/s3rvac/git-edit-index/issues/5)), renamed files\n  (status `R`, [#6](https://github.com/s3rvac/git-edit-index/issues/6)), copied\n  files (status `C`, [#7](https://github.com/s3rvac/git-edit-index/issues/7)),\n  and partially staged files (status `MM`,\n  [#8](https://github.com/s3rvac/git-edit-index/issues/8)) is currently not\n  supported.\n\nDevelopment\n-----------\n\nTo run tests, install [pytest](https://docs.pytest.org/) and run\n```\nmake tests\n```\nTo perform linting checks, install [flake8](https://flake8.pycqa.org/) and run\n```\nmake lint\n```\n\nLicense\n-------\n\nCopyright (c) 2015 Petr Zemek (s3rvac@petrzemek.net) and contributors.\n\nDistributed under the MIT license. See the\n[`LICENSE`](https://github.com/s3rvac/git-edit-index/blob/master/LICENSE) file\nfor more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3rvac%2Fgit-edit-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs3rvac%2Fgit-edit-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3rvac%2Fgit-edit-index/lists"}