Add squash merge support
- PR Description
I do git merge --squash branch a lot so I've added this shortcut for myself. I think some people may want this too so here it is.
- Please check if the PR fulfills these requirements
- [x] Cheatsheets are up-to-date (run
go generate ./...) - [x] Code has been formatted (see here)
- [x] Tests have been added/updated (see here for the integration test guide)
- [x] Text is internationalised (see here)
- [x] Docs (specifically
docs/Config.md) have been updated if necessary - [x] You've read through your own file changes for silly mistakes etc
@rodakd I haven't heard from you again after giving feedback; do you intend to keep working on this?
Hello since there's no news, should I remake a PR with theses changes ?
Hello since there's no news, should I remake a PR with theses changes ?
I wouldn't have any objections to that. I would, however, be interested in discussing this question first. Any thoughts on that?
Hello since there's no news, should I remake a PR with theses changes ?
I wouldn't have any objections to that. I would, however, be interested in discussing this question first. Any thoughts on that?
I personally have no objection but in my use case I don't always make a commit, I might divide the changes in multiple commits or remove some change. However, having a formatted message showing well that it is a merge could be good for clarity and commit are always editable. Maybe having both good be great, but it requires to either open a new window like for rebase options, or having to keys which might a bit too much. What do you think ?
We probably want to have a confirmation panel anyway (this PR has one). Instead of the confirmation panel we could show a menu with two options, something like this, maybe:
+-- Squash Merge "my-feature" into current branch --+
|c Squash Merge and commit |
|u Squash Merge and leave uncommitted |
| Cancel |
+---------------------------------------------------+
Or something along these lines. I would vote for making the "and commit" version the first one, as I think it's the more common one.
This was completed in https://github.com/jesseduffield/lazygit/pull/3566. Thanks for getting the ball rolling on it!