GitXplorerGitXplorer
l

go-git-cmd-wrapper

public
56 stars
17 forks
0 issues

Commits

List of commits on branch main.
Unverified
9386cd3529e96b3440bc813c2bd431e46536cf48

chore: improve generator errors

lldez committed 7 months ago
Unverified
e600790432eca13a16a28cbbc12cd5583a19955a

feat(stash): add command

lldez committed 7 months ago
Unverified
099b3aa3321cc4d611487b0bcfd288664309f5ff

chore: remove invisible characters

lldez committed 7 months ago
Unverified
7b171cf754fd84d45e64d050280f711f0551b9ea

chore: update CI and linter

lldez committed 7 months ago
Unverified
49360e9f09467847e081f32725924ed3e37479dd

chore: update Go, CI, and linter

lldez committed a year ago
Unverified
564512712aed20c493d250c5435f409b70d18da9

chore: update linter

lldez committed 2 years ago

README

The README file for this repository.

Go Git Cmd Wrapper

Build Status PkgGoDev Go Report Card

Sponsor

It's a simple wrapper around git command.

Import github.com/ldez/go-git-cmd-wrapper/v2/git.

// clone
output, err := git.Clone(clone.Repository("https://github.com/ldez/prm"))
// with debug option
output, err := git.Clone(clone.Repository("https://github.com/ldez/prm"), git.Debug)
output, err := git.Clone(clone.Repository("https://github.com/ldez/prm"), git.Debugger(true))

// fetch
output, err = git.Fetch(fetch.NoTags, fetch.Remote("upstream"))
output, err = git.Fetch(fetch.NoTags, fetch.Remote("upstream"), fetch.RefSpec("master"))

// add a remote
output, err = git.Remote(remote.Add, remote.Name("upstream"), remote.URL("https://github.com/ldez/prm"))

More examples: Documentation