1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

support deleting remote branches

This commit is contained in:
Jesse Duffield
2019-11-17 13:47:47 +11:00
parent f0cd730fbb
commit a9cd647075
5 changed files with 53 additions and 2 deletions

View File

@ -1085,3 +1085,7 @@ func (c *GitCommand) IsHeadDetached() bool {
err := c.OSCommand.RunCommand("git symbolic-ref -q HEAD")
return err != nil
}
func (c *GitCommand) DeleteRemoteBranch(remoteName string, branchName string) error {
return c.OSCommand.RunCommand(fmt.Sprintf("git push %s --delete %s", remoteName, branchName))
}