Skip to content

Multi-Commit Selection for Diff Operations #4477

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

Open
biegacz1 opened this issue Apr 10, 2025 · 4 comments
Open

Multi-Commit Selection for Diff Operations #4477

biegacz1 opened this issue Apr 10, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@biegacz1
Copy link

Is your feature request related to a problem? Please describe:
When working with git history in lazygit, I often need to analyze or share changes across multiple specific commits. Currently, I need to individually view or copy diffs for each commit separately. There's no way to copy diff of multiple commits.

Describe the solution you'd like:
I would like lazygit to support selecting multiple commits in the commits view and then:

  1. Copy the combined diff of all selected commits to the clipboard
  2. Open all selected commits in the configured difftool with a single command

Describe alternatives you've considered:

  • Writing shell scripts that extract diffs for specific commit ranges
  • Using git on the command line with commands like git difftool commit1..commit2, but this requires leaving lazygit
@biegacz1 biegacz1 added the enhancement New feature or request label Apr 10, 2025
@stefanhaller
Copy link
Collaborator

All of this is supported in the latest version, I do these things all the time. Which version are you using?

@biegacz1
Copy link
Author

I use v0.48.0 and when I select range of commits then type y I get an info on the bottom that action doesn't support range, only single element.

@stefanhaller
Copy link
Collaborator

Ah ok. You need to press enter to go into the diff to see its files, then you can type y and get a menu to copy the diff of either the selected file or all files.

I guess we could improve this to also offer the menu in the commits list, but the diff option would really be the only one that would be enabled in the menu.

@biegacz1
Copy link
Author

Oh I didn't know that I can do that that way, thanks!

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

2 participants