Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete/suggest git commit message based on commit history #941

Open
pyrooka opened this issue Aug 19, 2020 · 12 comments
Open

Autocomplete/suggest git commit message based on commit history #941

pyrooka opened this issue Aug 19, 2020 · 12 comments
Labels
enhancement New feature or request

Comments

@pyrooka
Copy link

pyrooka commented Aug 19, 2020

Is your feature request related to a problem? Please describe.
Sometimes we (at least me) just copy messages from previous commits. For example: "Bump version...", Update X to version Y.

Describe the solution you'd like
Suggest a message based on the history when we are typing, like in k9s:
Screenshot 2020-08-19 at 12 32 17
I am not thinking about some highly intelligent, super fancy AI powered autocomplete engine, just a simple regex which matches from the start.

@pyrooka pyrooka added the enhancement New feature or request label Aug 19, 2020
@pyrooka
Copy link
Author

pyrooka commented Aug 25, 2020

image

What do you think about something like this?

@ecosse3
Copy link

ecosse3 commented Apr 21, 2022

I would love to see that feature implemented.

Also, it would be nice to have autocompletion of Conventional Commits like feat, fix, refactor etc. as well as scope for them (based on file/directory names of staged files for example).

@jnmcfly
Copy link

jnmcfly commented Dec 22, 2022

using the https://github.com/lintingzhen/commitizen-go wizard would be awesome here. Use lazygit and commitizen in split terminal right now.

@nahtnam
Copy link

nahtnam commented Feb 14, 2023

https://github.com/Nutlope/aicommits

Would be cool if we could use this

@WladyX
Copy link

WladyX commented Apr 5, 2023

Came here to ask for aicommits support, was sure that no one asked before, but searched anyway :)
I would love this support also, but in the meantime i found a workaround:

  • go to your repo, do aic hook install
  • open lazygit and commit via C -> this will open the git commit editor, which is defined to fire up aic

@WladyX
Copy link

WladyX commented Apr 5, 2023

Just a bug related to my workaound, if you don't issue the lazygit from the root repo path, i get:

2023/04/05 15:30:32 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*errors.errorString repository does not exist
/private/tmp/lazygit-20230201-69813-1wzwylz/lazygit-0.37.0/pkg/app/app.go:54 (0x10084acf4)
/private/tmp/lazygit-20230201-69813-1wzwylz/lazygit-0.37.0/pkg/app/entry_point.go:146 (0x10084c6d0)
/private/tmp/lazygit-20230201-69813-1wzwylz/lazygit-0.37.0/main.go:23 (0x10084e628)
/opt/homebrew/Cellar/go/1.19.5/libexec/src/runtime/proc.go:250 (0x10029bcec)
/opt/homebrew/Cellar/go/1.19.5/libexec/src/runtime/asm_arm64.s:1172 (0x1002ca344)

@pidgeon777
Copy link

Just a bug related to my workaound, if you don't issue the lazygit from the root repo path, i get:

2023/04/05 15:30:32 An error occurred! Please create an issue at: https://github.com/jesseduffield/lazygit/issues

*errors.errorString repository does not exist
/private/tmp/lazygit-20230201-69813-1wzwylz/lazygit-0.37.0/pkg/app/app.go:54 (0x10084acf4)
/private/tmp/lazygit-20230201-69813-1wzwylz/lazygit-0.37.0/pkg/app/entry_point.go:146 (0x10084c6d0)
/private/tmp/lazygit-20230201-69813-1wzwylz/lazygit-0.37.0/main.go:23 (0x10084e628)
/opt/homebrew/Cellar/go/1.19.5/libexec/src/runtime/proc.go:250 (0x10029bcec)
/opt/homebrew/Cellar/go/1.19.5/libexec/src/runtime/asm_arm64.s:1172 (0x1002ca344)

Has this been solved?

@moritztim
Copy link

It would be great if it was possible to get an AI commit preview for the title and the same for the description, after the title is written and the description field entered.

@jesseduffield jesseduffield changed the title Autocomplete/suggest git commit message Autocomplete/suggest git commit message based on commit history Sep 5, 2023
@noahbald
Copy link

Would also like to see this work in a zsh fashion for commit and branch names. ie pressing tab or -> to autofill up to a certain point in the message based on previous commits/branches

@DhruvaG2000
Copy link

++
Would love to see this feature, we can start with something as basic as auto suggest title based on the path of the file being changed.

@ALameLlama
Copy link

ALameLlama commented Jul 24, 2024

@WladyX did you do anything else to get the hooks workings within lazygit?

I installed it, setup my API key, installed the hook within my repo and can see it within .git/hooks but when I stage a file and press c it doesn't trigger it, I can manually trigger it from the cli but not within lazygit

edit: lazygit it opened from the repo root

@WladyX
Copy link

WladyX commented Aug 1, 2024

nothing else, but it must be capital c, C, not c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

10 participants