jesseduffield / jesseduffield/lazygit
Use `git history reword` instead of `git rebase -i` for rewording non HEAD commits
- 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 noticed that lazygit is using `git rebase -i ...` for rewording older commits; but git very recently shipped a core feature to make this slightly simpler.
See https://github.blog/open-source/git/highlights-from-git-2-54
> git history reword opens your editor with the specified commit’s message and rewrites it in place, updating any branches that descend from that commit. Unlike git rebase, it doesn’t touch your working tree or index, and it can even operate in a [bare repository](https://git-scm.com/docs/gitglossary/2.54.0#def_bare_repository).
### Describe the solution you'd like
When you press r on an old commit, call `git history reword HASH` instead of what we do now if the installed git version is new enough.
### Describe alternatives you've considered
N/A
### Additional context
I'm a BIG fan of lazygit and use it way too much daily. I'm not a contributor to this project yet, but I can give it a try to implement this feature if @jesseduffield thinks it's worthwhile.
Contributor guide
Assessment
This issue has not been assessed yet.