Skip to content
/ go-repo Public

Go-Repo is just golang wrapper around git commands

License

Notifications You must be signed in to change notification settings

fsamin/go-repo

Repository files navigation

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])
    ...

About

Go-Repo is just golang wrapper around git commands

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages