-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Is your feature request related to a problem? Please describe.
When using git flow, finishing a branch sometimes requires passing extra arguments like --keepremote to prevent the remote branch from being deleted (the merge request is being marked as closed, not merged). Currently, lazygit's git flow finish command doesn't support passing additional arguments, so users must exit lazygit and run the command manually in the terminal.
Describe the solution you'd like
Add a configurable gitFlowFinishArgs option under git in the user config (config.yml) that accepts a list of extra arguments to append to git flow finish . For example:
git:
gitFlowFinishArgs:
- "--keepremote"
When the list is empty (the default), git flow finish behaves exactly as it does today with no extra arguments.
Describe alternatives you've considered
- Hardcoding
--keepremoteinto the finish command, but this forces the flag on all users. - Using a lazygit custom command keybinding to run git flow finish manually, but this loses the branch-type detection logic and menu integration that lazygit provides.
Additional context
This is useful for teams that use shared remote branches and want to keep them after finishing a git flow feature/release/hotfix. The implementation reads from the existing user config system and passes the configured args to the git flow finish command via the Arg() builder, so it's a minimal, non-breaking change.