Skip to content

Instantly share code, notes, and snippets.

@josharian
Created January 27, 2018 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josharian/cec3dbe91b2cffaf7419f53757cce3d3 to your computer and use it in GitHub Desktop.
Save josharian/cec3dbe91b2cffaf7419f53757cce3d3 to your computer and use it in GitHub Desktop.
package main
import (
"os"
git "gopkg.in/libgit2/git2go.v26"
)
func main() {
pwd, err := os.Getwd()
check(err)
repo, err := git.OpenRepositoryExtended(pwd, 0, "")
check(err)
rw, err := repo.Walk()
check(err)
rw.Push(nil)
}
func check(err error) {
if err != nil {
panic(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment