commit 1
This commit is contained in:
23
git/pull.go
Normal file
23
git/pull.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package git
|
||||
|
||||
// Pull pulls the latest changes from the remote
|
||||
func (g *Git) Pull() error {
|
||||
|
||||
_, err := g.Execute("pull")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// PullMain pulls the latest changes from the remote main branch
|
||||
func (g *Git) PullMain() error {
|
||||
|
||||
_, err := g.Execute("pull", "origin", g.MainBranch)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user