jesseduffield / jesseduffield/lazygit

on commit with no files selected add an option to use file under the cursor

Open
#5,915 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

### Is your feature request related to a problem? Please describe.
i often look on a diff of a specific file and then press `c` to commit it but by pressing `c` i just get a dialog "No files staged: You have not staged any files. Commit all files". sometimes i already start typing and trigger the "yes" which is kind of annoying for me.

### Describe the solution you'd like
not a change of the default behavior but an option where i can modify the behavior of this to ask if i want to commit the file "filename" under the cursor.
or a select dialog where i can choose between all, all like with `git add -u` see #1641 or only current file under the cursor (with maybe an option what is preselected)

### Describe alternatives you've considered
-

### Additional context
-

Contributor guide

Open the contributing guide

Research direction

Start by tracing the commit action that shows the “No files staged” dialog when no files are selected. Done means adding a configurable choice for all files, git add -u-like files, or only the file under the cursor, while preserving the current default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.