go-git: examples

Here you can find a list of annotated go-git examples:

  • showcase - A small showcase of the capabilities of go-git
  • open - Opening a existing repository cloned by git
  • clone - Cloning a repository
  • commit - Commit changes to the current branch to an existent repository
  • push - Push repository to default remote (origin)
  • pull - Pull changes from a remote repository
  • checkout - Check out a specific commit from a repository
  • log - Emulate git log command output iterating all the commit history from HEAD reference
  • branch - How to create and remove branches or any other kind of reference.
  • tag - List/print repository tags
  • remotes - Working with remotes: adding, removing, etc
  • progress - Printing the progress information from the sideband
  • revision - Solve a revision into a commit
Expand ▾ Collapse ▴




This section is empty.


This section is empty.


func CheckArgs

func CheckArgs(arg ...string)

    CheckArgs should be used to ensure the right command line arguments are passed before executing an example.

    func CheckIfError

    func CheckIfError(err error)

      CheckIfError should be used to naively panics if an error is not nil.

      func Info

      func Info(format string, args ...interface{})

        Info should be used to describe the example commands that are about to run.

        func Warning

        func Warning(format string, args ...interface{})

          Warning should be used to display a warning


          This section is empty.

          Source Files