[−][src]Struct rustygit::Repository
A local git repository
Methods
impl Repository
[src]
pub fn new<P: AsRef<Path>>(p: P) -> Repository
[src]
Create a Repository struct from a pre-existing local git repository
pub fn clone<P: AsRef<Path>>(url: GitUrl, p: P) -> Result<Repository>
[src]
Clone a remote git repository locally
pub fn init<P: AsRef<Path>>(p: P) -> Result<Repository>
[src]
Initialise a given folder as a git repository
pub fn create_local_branch(&self, branch_name: &BranchName) -> Result<()>
[src]
Create and checkout a new local branch
pub fn switch_branch(&self, branch_name: &BranchName) -> Result<()>
[src]
Checkout the specified branch
pub fn add(&self, pathspecs: Vec<&str>) -> Result<()>
[src]
Add file contents to the index
pub fn commit_all(&self, message: &str) -> Result<()>
[src]
Commit all staged files
pub fn push(&self) -> Result<()>
[src]
Push the curent branch to its associated remote
pub fn push_to_upstream(
&self,
upstream: &str,
upstream_branch: &BranchName
) -> Result<()>
[src]
&self,
upstream: &str,
upstream_branch: &BranchName
) -> Result<()>
Push the curent branch to its associated remote, specifying the upstream branch
pub fn add_remote(&self, name: &str, url: &GitUrl) -> Result<()>
[src]
Add a new remote
pub fn fetch_remote(&self, remote: &str) -> Result<()>
[src]
Fetch a remote
pub fn create_branch_from_startpoint(
&self,
branch_name: &str,
startpoint: &str
) -> Result<()>
[src]
&self,
branch_name: &str,
startpoint: &str
) -> Result<()>
Create a new branch from a start point, such as another local or remote branch
pub fn list_branches(&self) -> Result<Vec<String>>
[src]
List local branches
Auto Trait Implementations
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnwindSafe for Repository
impl RefUnwindSafe for Repository
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,