diff --git a/README.md b/README.md index 57f7f6427..9bbca1d37 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ if err != nil { panic(err) } +if err := r.Remotes[git.DefaultRemoteName].Connect(); err != nil { + panic(err) +} + if err := r.PullDefault(); err != nil { panic(err) } diff --git a/examples/basic/main.go b/examples/basic/main.go index f5a1c8a8a..4a96b446a 100644 --- a/examples/basic/main.go +++ b/examples/basic/main.go @@ -15,6 +15,10 @@ func main() { panic(err) } + if err := r.Remotes[git.DefaultRemoteName].Connect(); err != nil { + panic(err) + } + if err := r.PullDefault(); err != nil { panic(err) }