When a repository periodically generate GitHub tags using GitHub Actions, they will run into this command failing with the exit code 1. This error seems to happen if remote tags have changed from the local tags. Adding --force allows overwriting of the local tags with the remote ones.
Before Git 2.20 (released Dec 2018), --force used to be implicit when using git fetch --tags.
When a repository periodically generate GitHub tags using GitHub Actions, they will run into this command failing with the exit code 1. This error seems to happen if remote tags have changed from the local tags. Adding
--force
allows overwriting of the local tags with the remote ones.Before Git 2.20 (released Dec 2018), --force used to be implicit when using
git fetch --tags
.Some reference posts: https://bobcares.com/blog/git-fetch-failed-with-exit-code-1/#:~:text=In%20short%2C%20we%20can%20fix,its%20properness%20in%20case%20sensitivity.
https://github.com/semantic-release/git/issues/136