diff options
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index 010c9fad..9cbb1872 100644 --- a/models/repo.go +++ b/models/repo.go @@ -482,6 +482,11 @@ func UpdateLocalCopyBranch(repoPath, localPath, branch string) error { return fmt.Errorf("git clone %s: %v", branch, err) } } else { + if err := git.Fetch(localPath, git.FetchRemoteOptions{ + Prune: true, + }); err != nil { + return fmt.Errorf("git fetch: %v", err) + } if err := git.Checkout(localPath, git.CheckoutOptions{ Branch: branch, }); err != nil { |