# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# README
Go Git Cmd Wrapper
fork from github.com/ldez/go-git-cmd-wrapper
It's a simple wrapper around git
command.
Import github.com/codysk/go-git-cmd-wrapper/v2/git
.
// clone
output, err := git.Clone(clone.Repository("https://github.com/codysk/prm"))
// with debug option
output, err := git.Clone(clone.Repository("https://github.com/codysk/prm"), git.Debug)
output, err := git.Clone(clone.Repository("https://github.com/codysk/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/codysk/prm"))
More examples: Documentation