Repository: scala-steward-org/scala-steward (scala)

Issue:
git fetch --tags fails with 'rejected (would clobber existing tag)'
Just noticed this error in the logs of my public instance:
```
2020-12-31 12:14:44,738 INFO  ──────────── Steward augustjune/canoe ────────────
2020-12-31 12:14:44,738 INFO  Check cache of augustjune/canoe
2020-12-31 12:14:45,139 INFO  Clone and synchronize augustjune/canoe
2020-12-31 12:14:48,650 ERROR Steward augustjune/canoe failed
java.io.IOException: '... git fetch --tags upstream master' exited with code 1
From https://github.com/augustjune/canoe
 * branch            master     -> FETCH_HEAD
 ! [rejected]        v0.0.2     -> v0.0.2  (would clobber existing tag)
 * [new tag]         v0.0.3     -> v0.0.3
 * [new tag]         v0.0.4     -> v0.0.4
 * [new tag]         v0.0.5     -> v0.0.5
 * [new tag]         v0.1.0     -> v0.1.0
 * [new tag]         v0.1.1     -> v0.1.1
 * [new tag]         v0.1.2     -> v0.1.2
 * [new tag]         v0.2.0     -> v0.2.0
 * [new tag]         v0.3.0     -> v0.3.0
 * [new tag]         v0.3.1     -> v0.3.1
 * [new tag]         v0.4.0     -> v0.4.0
 * [new tag]         v0.4.1     -> v0.4.1
 * [new tag]         v0.5.0     -> v0.5.0
 * [new tag]         v0.5.0-RC1 -> v0.5.0-RC1
 * [new tag]         v0.5.1     -> v0.5.1
 * [new branch]      master     -> upstream/master
```
The `v0.0.2` tag is causing trouble: ` ! [rejected]        v0.0.2     -> v0.0.2  (would clobber existing tag)`. Probably because it has been deleted and recreated in the upstream repo.

Pull request:
Closes #1853.

Patch:
diff --git a/modules/core/src/main/scala/org/scalasteward/core/git/FileGitAlg.scala b/modules/core/src/main/scala/org/scalasteward/core/git/FileGitAlg.scala
index 0646dea3a5..5fe54f4b07 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/git/FileGitAlg.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/git/FileGitAlg.scala
@@ -129,7 +129,7 @@ final class FileGitAlg[F[_]](config: Config)(implicit
       branch = defaultBranch.name
       remoteBranch = s"$remote/$branch"
       _ <- git("remote", "add", remote, upstreamUrl.toString)(repo)
-      _ <- git("fetch", "--tags", remote, branch)(repo)
+      _ <- git("fetch", "--force", "--tags", remote, branch)(repo)
       _ <- git("checkout", "-B", branch, "--track", remoteBranch)(repo)
       _ <- git("merge", remoteBranch)(repo)
       _ <- push(repo, defaultBranch)


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/vcs/VCSRepoAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/vcs/VCSRepoAlgTest.scala
index b25ea36729..3cde2ef0d4 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/vcs/VCSRepoAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/vcs/VCSRepoAlgTest.scala
@@ -38,7 +38,7 @@ class VCSRepoAlgTest extends FunSuite {
         envVars ++ List(repoDir, "git", "config", "user.email", "bot@example.org"),
         envVars ++ List(repoDir, "git", "config", "user.name", "Bot Doe"),
         envVars ++ List(repoDir, "git", "remote", "add", "upstream", url0),
-        envVars ++ List(repoDir, "git", "fetch", "--tags", "upstream", "master"),
+        envVars ++ List(repoDir, "git", "fetch", "--force", "--tags", "upstream", "master"),
         envVars ++ List(repoDir, "git", "checkout", "-B", "master", "--track", "upstream/master"),
         envVars ++ List(repoDir, "git", "merge", "upstream/master"),
         envVars ++ List(repoDir, "git", "push", "--force", "--set-upstream", "origin", "master"),