mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 22:17:05 +02: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)))
|
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
|
// Fetch fetch git repo
|
||||||
func (c *GitCommand) Fetch() error {
|
func (c *GitCommand) Fetch() error {
|
||||||
return c.OSCommand.RunCommand("git fetch")
|
return c.OSCommand.RunCommand("git fetch")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user