jesseduffield / lazygit

simple terminal UI for git commands
MIT License
52.66k stars 1.84k forks source link

Configuration option to remove branch name default from commit message #3764

Closed JonnySB closed 3 months ago

JonnySB commented 3 months ago

Hi, firstly I LOVE LAZYGIT! Thank you for all that you do - it's awesome! Just a small quality of life suggestion that would suit me. I have searched for this as a configuration option and couldn't find anything but I could well have missed something, and so apologies if this is the case. I use lazygit both directly in the terminal and through the neovim integration, and this is present in both.

Is your feature request related to a problem? Please describe. I find it slightly annoying to have to delete out the branch name every time I want to create a commit. It's obviously not a massive thing but it would be nice to just be able to start typing the commit message immediately, saving those precious seconds.

Describe the solution you'd like Have the default commit message be blank, ready to type your commit message. I.e. not autopopulate with the branch name.

Describe alternatives you've considered None

Additional context None

mark2185 commented 3 months ago

Just to confirm the steps:

image

JonnySB commented 3 months ago

Yes, is this not default behaviour?

mark2185 commented 3 months ago

Not the default, but you can set it up with predefined commit message prefixes.

Could you please post your config.yml? It should be in the directory you get from running lazygit -cd.

JonnySB commented 3 months ago

Thanks. So I had been down this route and currently have both the pattern and replace options set to empty strings. Am I missing something?

JonnySB commented 3 months ago

Ah I'm dumb - just realised I need to state the pattern. All fixed! Thank you for pointing me in the right direction!

mark2185 commented 3 months ago

You can also just omit it from the config :)

I'm glad it's sorted!