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


            

            
                              
                                          


             

                                      
 
                                     

                         

                                        
                         
 
package main

import (
	"os"

	"srcd.works/go-git.v4"
	. "srcd.works/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)
}