github.com/1800alex/go-git-cmd-wrapper@v1.1.0/doc.go (about)

     1  /*
     2  Package go_git_cmd_wrapper A simple wrapper around `git` command.
     3  
     4  		import (
     5  			// ...
     6  			"github.com/ldez/go-git-cmd-wrapper/git"
     7  			// ...
     8  			"github.com/ldez/go-git-cmd-wrapper/clone"
     9  			"github.com/ldez/go-git-cmd-wrapper/config"
    10  			"github.com/ldez/go-git-cmd-wrapper/fetch"
    11  			"github.com/ldez/go-git-cmd-wrapper/remote"
    12  		)
    13  
    14  		// clone
    15  		output, err := git.Clone(clone.Repository("https://github.com/ldez/gcg"))
    16  		// with debug option
    17  		output, err := git.Clone(clone.Repository("https://github.com/ldez/gcg"), git.Debug)
    18  		output, err := git.Clone(clone.Repository("https://github.com/ldez/gcg"), git.Debugger(true))
    19  
    20  		// fetch
    21  		output, err = git.Fetch(fetch.NoTags, fetch.Remote("upstream"))
    22  		output, err = git.Fetch(fetch.NoTags, fetch.Remote("upstream"), fetch.RefSpec("master"))
    23  
    24  		// add a remote
    25  		output, err = git.Remote(remote.Add, remote.Name("upstream"), remote.URL("https://github.com/ldez/gcg"))
    26  
    27  */
    28  package go_git_cmd_wrapper