aboutsummaryrefslogtreecommitdiffstats
path: root/_examples/push
diff options
context:
space:
mode:
authorAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-02-28 11:56:10 +0100
committerAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-02-28 11:56:10 +0100
commit305f28004ecbc03ea353437cf4c76423d93fbbd8 (patch)
treeeb6078b1213dec261881739170c5cd1dd13be7b8 /_examples/push
parent0e9dea19f856e256e609c3390e000760d2b2b95a (diff)
downloadgo-git-305f28004ecbc03ea353437cf4c76423d93fbbd8.tar.gz
_examples: improve documentation
Diffstat (limited to '_examples/push')
-rw-r--r--_examples/push/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/_examples/push/main.go b/_examples/push/main.go
index aaec5a3..7c23642 100644
--- a/_examples/push/main.go
+++ b/_examples/push/main.go
@@ -7,6 +7,8 @@ import (
. "srcd.works/go-git.v4/_examples"
)
+// Example of how to open a repository in a specific path, and do a push to
+// his default remote (origin).
func main() {
CheckArgs("<repository-path>")
path := os.Args[1]
@@ -15,6 +17,7 @@ func main() {
CheckIfError(err)
Info("git push")
+ // push using default push options
err = r.Push(&git.PushOptions{})
CheckIfError(err)
}