mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Support fastforwarding worktree
This commit is contained in:
parent
a313b16704
commit
b3060065d9
6 changed files with 107 additions and 4 deletions
|
@ -261,6 +261,13 @@ func (self *Shell) AddWorktree(base string, path string, newBranchName string) *
|
|||
})
|
||||
}
|
||||
|
||||
// add worktree and have it checkout the base branch
|
||||
func (self *Shell) AddWorktreeCheckout(base string, path string) *Shell {
|
||||
return self.RunCommand([]string{
|
||||
"git", "worktree", "add", path, base,
|
||||
})
|
||||
}
|
||||
|
||||
func (self *Shell) AddFileInWorktree(worktreePath string) *Shell {
|
||||
self.CreateFile(filepath.Join(worktreePath, "content"), "content")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue