diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-17 13:47:47 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-21 22:07:14 +1100 |
commit | a9cd647075119c760ca22cceba8c4ad14687b732 (patch) | |
tree | c0327f30ec6ab244a14c07003dfce65c135017ee /pkg/commands | |
parent | f0cd730fbb025d5c9068913f5ef11c5082617209 (diff) |
support deleting remote branches
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git.go | 4 |
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)) +} |