Add a keybinding for 'git add --intent-to-add' ('git add -D')
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 5.6k
- Forks
- 357
- Avg merge
- 15h 47m
- Merged PRs (30d)
- 2
Description
Is your feature request related to a problem? Please describe.
Sometimes I want to see a diff in Neogit for a file that hasn't been added yet. The only way to do it inside Neogit is by staging it (pressing s).
Describe the solution you'd like
The git add command supports the flag --intent-to-add (docs here). Neogit could support it with a top-level keybinding for the NeogitStatus buffer, for example i.
Pressing i would run git add --intent-to-add <file-under-cursor> and result in this:
Note that the file is in the Unstaged area.
Describe alternatives you've considered
Run git add --intent-to-add <file-under-cursor> in the CLI. Defeats the purpose of Neogit.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the NeogitStatus buffer's top-level keybinding definitions and trace how the file under the cursor is passed to Git commands. Add the requested intent-to-add action and verify that pressing the binding runs git add --intent-to-add <file> while leaving the file in the Unstaged area.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, lua, neovim
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100