Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Conversation

kwboyd-shopify
Copy link
Contributor

@kwboyd-shopify kwboyd-shopify commented Jul 29, 2024

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.

semantic-release/git#136

@kwboyd-shopify kwboyd-shopify requested a review from a team July 29, 2024 18:12
@kwboyd-shopify kwboyd-shopify self-assigned this Jul 29, 2024
@kwboyd-shopify kwboyd-shopify merged commit a6f1948 into main Jul 29, 2024
16 of 17 checks passed
@kwboyd-shopify kwboyd-shopify deleted the kwb/force-fetch-tags branch July 29, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants