mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-12 08:36:25 -04:00
Added rebase functions
This commit is contained in:
parent
822dc5dada
commit
670f0e37c7
|
|
@ -260,6 +260,19 @@ func (c *GitCommand) RenameCommit(name string) error {
|
|||
return c.OSCommand.RunCommand(fmt.Sprintf("git commit --allow-empty --amend -m %s", c.OSCommand.Quote(name)))
|
||||
}
|
||||
|
||||
func (c *GitCommand) RebaseBranch(onto string) error {
|
||||
curBranch, err := c.CurrentBranchName()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.OSCommand.RunCommand(fmt.Sprintf("git rebase %s %s ", onto, curBranch))
|
||||
}
|
||||
|
||||
func (c *GitCommand) AbortRebaseBranch() error {
|
||||
return c.OSCommand.RunCommand("git rebase --abort")
|
||||
}
|
||||
|
||||
// Fetch fetch git repo
|
||||
func (c *GitCommand) Fetch() error {
|
||||
return c.OSCommand.RunCommand("git fetch")
|
||||
|
|
|
|||
Loading…
Reference in a new issue