Skip to content

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

Closed
eregon wants to merge 1 commit intoactions:masterfrom
eregon:patch-1
Closed

Recommend updating branches for major versions and not tags in the versioning docs#631
eregon wants to merge 1 commit intoactions:masterfrom
eregon:patch-1

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.

3 participants