Remotes

Repository.remotes

Returns all configured remotes.

Repository.create_remote(name, url) → Remote

Creates a new remote.

The Remote type

Remote.name

Name of the remote refspec

Remote.url

Url of the remote

Remote.refspec_count

Number of refspecs.

Remote.get_refspec(n) -> (str, str)

Return the refspec at the given position.

Remote.fetch() → {'indexed_objects': int, 'received_objects' : int, 'received_bytesa' : int}

Negotiate what objects should be downloaded and download the packfile with those objects

Remote.push(refspec)

Push the given refspec to the remote. Raises GitError on error.

Remote.save()

Save a remote to its repository configuration.

Table Of Contents

Previous topic

Configuration files

Next topic

Blame

This Page