support adding/removing remotes

This commit is contained in:
Jesse Duffield 2019-11-17 12:02:39 +11:00
parent 1f3e1720a3
commit 6b7aaeca45
8 changed files with 139 additions and 27 deletions

View file

@ -1061,3 +1061,11 @@ func (c *GitCommand) BeginInteractiveRebaseForCommit(commits []*Commit, commitIn
func (c *GitCommand) SetUpstreamBranch(upstream string) error {
return c.OSCommand.RunCommand(fmt.Sprintf("git branch -u %s", upstream))
}
func (c *GitCommand) AddRemote(name string, url string) error {
return c.OSCommand.RunCommand(fmt.Sprintf("git remote add %s %s", name, url))
}
func (c *GitCommand) RemoveRemote(name string) error {
return c.OSCommand.RunCommand(fmt.Sprintf("git remote remove %s", name))
}