summaryrefslogtreecommitdiffstats
path: root/pkg/commands
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-17 13:47:47 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-21 22:07:14 +1100
commita9cd647075119c760ca22cceba8c4ad14687b732 (patch)
treec0327f30ec6ab244a14c07003dfce65c135017ee /pkg/commands
parentf0cd730fbb025d5c9068913f5ef11c5082617209 (diff)
support deleting remote branches
Diffstat (limited to 'pkg/commands')
-rw-r--r--pkg/commands/git.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index e385d6159..912483b84 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -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))
+}