mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Add new command "Move commits to new branch"
This commit is contained in:
@ -80,6 +80,17 @@ func (self *BasicCommitsController) GetKeybindings(opts types.KeybindingsOpts) [
|
||||
GetDisabledReason: self.require(self.singleItemSelected()),
|
||||
Description: self.c.Tr.CreateNewBranchFromCommit,
|
||||
},
|
||||
{
|
||||
// Putting this in BasicCommitsController even though we really only want it in the commits
|
||||
// panel. But I find it important that this ends up next to "New Branch", and I couldn't
|
||||
// find another way to achieve this. It's not such a big deal to have it in subcommits and
|
||||
// reflog too, I'd say.
|
||||
Key: opts.GetKey(opts.Config.Branches.MoveCommitsToNewBranch),
|
||||
Handler: self.c.Helpers().Refs.MoveCommitsToNewBranch,
|
||||
GetDisabledReason: self.c.Helpers().Refs.CanMoveCommitsToNewBranch,
|
||||
Description: self.c.Tr.MoveCommitsToNewBranch,
|
||||
Tooltip: self.c.Tr.MoveCommitsToNewBranchTooltip,
|
||||
},
|
||||
{
|
||||
Key: opts.GetKey(opts.Config.Commits.ViewResetOptions),
|
||||
Handler: self.withItem(self.createResetMenu),
|
||||
|
Reference in New Issue
Block a user