Repository navigation
Cherrypick with the -x flag? #4787
|
Hi, is there way to set lazygit to use the |
Replies: 2 comments 4 replies
|
No, we don't have this. I personally don't find it important because I'm a proponent of rebase-heavy workflows, where the hashes tend to get stale (if you cherry-pick commits between feature branches, for example, and then rebase them). I do see of course that in some workflows the hashes can be useful, for example when cherry-picking commits from main to a hotfix branch. It's a bit unclear what the UX for this could be; long-term, something like #2849 could allow it. In the meantime, a custom command could help, for example customCommands:
- key: <whatever>
description: Cherry-pick -x
context: commits,subCommits
command: git cherry-pick -x {{.SelectedCommitRange.From}}^..{{.SelectedCommitRange.To}} |
|
I'd like to second the request for this feature; even as just a setting in lazygit's config file, off by default, that users could turn on if they want. That wouldn't require any change to the lazygit UX (^c, ^v work as usual but -x is appended to the cherry-pick git command executed). We are often in situations where we have to cherry-pick back into the main branch from other branches, and having a record of provenence is important. We also tend to use merge rather than rebase workflows. |
No, we don't have this. I personally don't find it important because I'm a proponent of rebase-heavy workflows, where the hashes tend to get stale (if you cherry-pick commits between feature branches, for example, and then rebase them). I do see of course that in some workflows the hashes can be useful, for example when cherry-picking commits from main to a hotfix branch.
It's a bit unclear what the UX for this could be; long-term, something like #2849 could allow it.
In the meantime, a custom command could help, for example