Created
January 27, 2018 00:28
-
-
Save josharian/cec3dbe91b2cffaf7419f53757cce3d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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