aboutsummaryrefslogblamecommitdiffstats
path: root/examples/push/main.go
blob: 250e5fed33cc20b4415c5366652f43c70b200157 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


            






                                             

                                      
 
                                     

                         

                                        
                         
 
package main

import (
	"os"

	"gopkg.in/src-d/go-git.v4"
	. "gopkg.in/src-d/go-git.v4/examples"
)

func main() {
	CheckArgs("<repository-path>")
	path := os.Args[1]

	r, err := git.PlainOpen(path)
	CheckIfError(err)

	Info("git push")
	err = r.Push(&git.PushOptions{})
	CheckIfError(err)
}