mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-12-05 23:18:28 +02:00
use selected branch as base when creating a new branch
This commit is contained in:
@@ -327,8 +327,8 @@ func (c *GitCommand) ResetToCommit(sha string, strength string) error {
|
||||
}
|
||||
|
||||
// NewBranch create new branch
|
||||
func (c *GitCommand) NewBranch(name string) error {
|
||||
return c.OSCommand.RunCommand("git checkout -b %s", name)
|
||||
func (c *GitCommand) NewBranch(name string, baseBranch string) error {
|
||||
return c.OSCommand.RunCommand("git checkout -b %s %s", name, baseBranch)
|
||||
}
|
||||
|
||||
// CurrentBranchName is a function.
|
||||
|
||||
Reference in New Issue
Block a user