Struct git2::Branch [] [src]

pub struct Branch<'repo> { /* fields omitted */ }

A structure to represent a git branch

A branch is currently just a wrapper to an underlying Reference. The reference can be accessed through the get and unwrap methods.

Methods

impl<'repo> Branch<'repo>
[src]

[src]

Creates a new branch from a reference

[src]

Gain access to the reference that is this branch

[src]

Take ownership of the underlying reference.

[src]

Delete an existing branch reference.

[src]

Determine if the current local branch is pointed at by HEAD.

[src]

Move/rename an existing local branch reference.

[src]

Return the name of the given local or remote branch.

May return Ok(None) if the name is not valid utf-8.

[src]

Return the name of the given local or remote branch.

[src]

Return the reference supporting the remote tracking branch, given a local branch reference.

[src]

Set the upstream configuration for a given local branch.

If None is specified, then the upstream branch is unset. The name provided is the name of the branch to set as upstream.