Skip to content

Commit

Permalink
Added GIT pull before commit, fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragonn committed Feb 4, 2019
1 parent a25bde4 commit 49966fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/store/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,6 @@ func (s *Store) Commit() (changed bool, err error) {
return false, nil
}

err = s.Git("pull", "-s", "recursive", "-X", "ours")
if err != nil {
return false, fmt.Errorf("failed to git pull -s recursive -X ours: %v", err)
}

err = s.Git("add", "-A")
if err != nil {
return false, fmt.Errorf("failed to git add -A: %v", err)
Expand Down Expand Up @@ -237,6 +232,11 @@ func (s *Store) commitAndPush() {
return
}

err = s.Git("pull", "-s", "recursive", "-X", "ours", "--no-edit")
if err != nil {
return false, fmt.Errorf("failed to git pull -s recursive -X ours --no-edit: %v", err)
}

err = s.Push()
if err != nil {
s.Logger.Errorf("%v", err)
Expand Down

0 comments on commit 49966fd

Please sign in to comment.