Categorygithub.com/fsamin/go-repo
repositorypackage
0.8.1
Repository: https://github.com/fsamin/go-repo.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

go-repo

Go-Repo is just wrapper arround git commands.

GoDoc Build Status Go Report Card

Clone a repository

    r, err := Clone(path, "https://github.com/fsamin/go-repo.git")
    ...

Get current branch

    r, err := Clone(path, "https://github.com/fsamin/go-repo.git")
    ...
    b, err := r.CurrentBranch()
    ...
    fmt.Println(b)

Fetch & Pull a remote branch

    r, err := Clone(path, "https://github.com/fsamin/go-repo.git")
    ...
    err = r.FetchRemoteBranch("origin", "tests")
    ...
    err = r.Pull("origin", "tests")
    ...

Git local config

    r, err := Clone(path, "https://github.com/fsamin/go-repo.git")
    ...
    r.LocalConfigSet("foo", "bar", "value"))
    val, err := r.LocalConfigGet("foo", "bar")
    ...

Search and open files

    r, err := Clone(path, "https://github.com/fsamin/go-repo.git")
    ...
    files, err := r.Glob("**/*.md")
    ...
    f, err := r.Open(files[0])
    ...