Shopify / shipit-engine

Deployment coordination
https://shopify.engineering/introducing-shipit
MIT License
1.41k stars 144 forks source link

Add --force to git fetch --tags command #1357

Closed kwboyd-shopify closed 1 month ago

kwboyd-shopify commented 1 month ago

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