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

Recommend updating branches for major versions and not tags in the versioning docs #631

Closed
wants to merge 1 commit into from

Conversation

eregon
Copy link

@eregon eregon commented Nov 11, 2020

This should be an obvious change.
git tags should not be moved, I would hope GitHub knows that, since most git users do.

For instance see what the git tag man page says about moving a tag: https://git-scm.com/docs/git-tag#_on_re_tagging
To keep it short, the man page calls moving a tag The insane thing.. Should be clear it's an anti-pattern.
It also explains there are various problems if users already saw the old tag, and it will not be updated for them on git pull which might result in confusion (e.g., git pull; git checkout v1 might checkout an old version of the tag).

A branch is what naturally moves in git.
Are there any advantages to use a moving tag for major versions? I don't see any.

Also this naturally prevents unintentionally going back with a major version:

# Assume the current version is v1.2

$ git tag -fa v1 -m "Update v1 tag" v1.1
$ git push origin v1 --force
# oops, went a release back, a mistake

$ git push origin v1.1:v1
push rejected, not a fast forward

So, how about recommending best git practices in the official versioning documentation of GitHub Actions with this PR?

Related: #214 (comment)

@umarcor
Copy link

umarcor commented Nov 30, 2021

@eregon, did you ever get any feedback about this PR?

@Paebbels
Copy link

@ GitHub Team, why is such an important PR not merged yet. Even no reaction to it?

How is it even possible that GitHub developers have such a bad knowledge about Git and it's behavior as well as the internal implementation of Git. Suggesting to move tags is not just bad practice...

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.

None yet

3 participants