remote

package
v2.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2025 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Overview

Package remote git-remote - Manage set of tracked repositories.

SYNOPSIS

Reference: https://git-scm.com/docs/git-remote

git remote [-v | --verbose]
git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url>
git remote rename <old> <new>
git remote remove <name>
git remote set-head <name> (-a | --auto | -d | --delete | <branch>)
git remote set-branches [--add] <name> <branch>...
git remote get-url [--push] [--all] <name>
git remote set-url [--push] <name> <newurl> [<oldurl>]
git remote set-url --add [--push] <name> <newurl>
git remote set-url --delete [--push] <name> <url>
git remote [-v | --verbose] show [-n] <name>...
git remote prune [-n | --dry-run] <name>...
git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]

DESCRIPTION

Manage the set of repositories ("remotes") whose branches you track.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(name, url string) types.Option

Add git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url>

func AddOpt

func AddOpt(g *types.Cmd)

AddOpt [--add]

func All

func All(g *types.Cmd)

All [--all]

func Auto

func Auto(g *types.Cmd)

Auto -a | --auto

func Delete

func Delete(g *types.Cmd)

Delete -d | --delete

func DryRun

func DryRun(g *types.Cmd)

DryRun [-n | --dry-run]

func Fetch

func Fetch(g *types.Cmd)

Fetch [-f]

func GetURL

func GetURL(name string) types.Option

GetURL git remote get-url [--push] [--all] <name>

func Master

func Master(symRef string) types.Option

Master [-m <master>]

func Mirror

func Mirror(option string) types.Option

Mirror [--mirror=<fetch|push>]

func NoTags

func NoTags(g *types.Cmd)

NoTags [--no-tags]

func Prune

func Prune(names ...string) types.Option

Prune git remote prune [-n | --dry-run] <name>…

func PruneOpt

func PruneOpt(g *types.Cmd)

PruneOpt [-p | --prune]

func Push

func Push(g *types.Cmd)

Push [--push]

func Remove

func Remove(name string) types.Option

Remove git remote remove <name>

func Rename

func Rename(oldName, newName string) types.Option

Rename git remote rename <old> <new>

func SetBranches

func SetBranches(name, branch string) types.Option

SetBranches git remote set-branches [--add] <name> <branch>…

func SetHead

func SetHead(name string) types.Option

SetHead git remote set-head <name> (-a | --auto | -d | --delete | <branch>)

func SetURL

func SetURL(name, newurl, oldurl string) types.Option

SetURL git remote set-url [--push] <name> <newurl> [<oldurl>] git remote set-url --add [--push] <name> <newurl> git remote set-url --delete [--push] <name> <url>

func Show

func Show(names ...string) types.Option

Show git remote [-v | --verbose] show [-n] <name>…

func Tags

func Tags(g *types.Cmd)

Tags [--tags]

func Track

func Track(branch string) types.Option

Track [-t <branch>]

func Update added in v2.4.0

func Update(remotes ...string) types.Option

Update Fetch updates for remotes or remote groups in the repository as defined by remotes.<group>.

func Verbose

func Verbose(g *types.Cmd)

Verbose [-v | --verbose]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL