-31

Using GitHub, forgetting that there was a name change from master to main is causing me headaches over and over. (I think it was an utterly pointless.) Old answers still have master as default GitHub branch; should we change these to main, when we encounter them?

13
  • 2
    I would suggest leaving a comment stating that the name has changed from master to main as well as editing them.
    – M-Chen-3
    Apr 9, 2021 at 18:05
  • 21
    Only if they've changed. Just because your repository has changed to main doesn't mean everyone's has.
    – Kevin B
    Apr 9, 2021 at 18:05
  • 10
    This question is going to be oblivioned just for the premise... More on point, please, don't go on an editing spree and change everything from master to main. This will serve nothing but enrage those who made those answers in the first place. If it is to stick, it will gradually replace the old naming, and referring to both for the sake of reducing confusion for people who are used to the older naming seems like a better alternative. Apr 9, 2021 at 18:22
  • @KevinB Good point, but I do think a comment mentioning the change could be helpful.
    – M-Chen-3
    Apr 9, 2021 at 18:49
  • 1
    @M-Chen-3 a comment mentioning what change? we don't need a comment on every old git question stating that some social movement happened. that is the very definition of noise.
    – Kevin B
    Apr 9, 2021 at 18:49
  • @KevinB That certain repositories nowadays may have main instead of master.
    – M-Chen-3
    Apr 9, 2021 at 18:50
  • 2
    A second reason for not editing it, aside creating a massive amount of work, is that it's still a semi-current standard. There's a lot of semi-arbitrary branch names out there, so it's not like it's gonna cause confusion (... at least in most cases - exceptions apply for people who don't understand how Git branching works, but that's not really a problem we can account for everywhere)
    – Zoe Mod
    Apr 9, 2021 at 18:51
  • 2
    @Zoe "Semi-current" - And for many it will remain a standard: i.stack.imgur.com/SLNyv.png Apr 9, 2021 at 18:53
  • 6
    Git questions are purely on the premise of Git - with the exception of questions directly saying "GitHub's default branch is master (unless changed)", nothing is now out-of-date with a change from master to main except for a few links here and there, and direct references to individual repos. The tiny difference, though, is that repos changing their default branch is a factual change, where as the name of the default branch is a matter of opinion.
    – Zoe Mod
    Apr 9, 2021 at 18:53
  • 2
    @Nick hence semi-current, because it's not the defacto, universal standard anymore. I still use master myself, but hey, that's just the direction we're going in atm. Updating perfectly valid git answers because of a socially induced change in a default branch name is still a ridiculously pointless job (the technical details are all valid, just requires an extra step instead of purely using The Key™), especially when the topic of whether it should change or not is this charged.
    – Zoe Mod
    Apr 9, 2021 at 18:59
  • 3
    @M-Chen-3 I think that's a non-starter, because git branch names are 100% a subjective decision in the first place. I've seen people use origin in place of master, but you could name it anything under the sun from yoda to pizza to theOneTrueSourceOfAllThatIsGoodAndHoly. It wouldn't make sense to leave a comment telling someone to rename feature-branch-1 to feature-branch-a, so don't do it with master to main either.
    – zcoop98
    Apr 9, 2021 at 20:44
  • 1
    As written, it's unclear if your question is about all git questions, or only about questions which are specifically about GitHub. Please edit your question to clarify if you are asking about changing all git questions or only those which are specifically about GitHub.
    – Makyen Mod
    Apr 9, 2021 at 20:48
  • 1
    Related: Usage of main instead of master in Git.
    – akuzminykh
    Apr 10, 2021 at 6:35

1 Answer 1

16

No.

But if there are other reasons why you would need to make an edit to such posts, you could consider making that change.

Do keep in mind that if you change the answer you might need to change the question as well. So then you have to ask yourself: Does the question need an edit except that one change? And if you do change the question, aren't you invalidating the other answers? So now those need to be edited as well. Maybe the Q/A is used as a duplicate target. Do they still make sense? If not, edit those Q/A's as well, etc.

I would refrain from leaving a comment. That is useless noise. If you insist on having a solid place to capture what happened between master and main, the tag wiki might be a good place to put that in.

5
  • 1
    The problem is that people rarely read the tag wikis. Leaving an explanatory comment would prevent people like the OP from experiencing headaches.
    – M-Chen-3
    Apr 9, 2021 at 18:51
  • 9
    @M-Chen-3 Counterargument: no one reads anything unless they're explicitly looking for it. Tag wikis are neglected, popups are blatantly ignored, posts on meta aren't seen unless people are linked to it... There's no way to win. A tag wiki is quite literally better than the alternatives, because at least it can be linked to. Or a meta post, obviously. Someone will find ways to ignore it either way
    – Zoe Mod
    Apr 9, 2021 at 19:07
  • 2
    also, a small note from someone invested in tags - this is a chicken-egg problem. People don't read the wikis in no small part due to them mostly being placeholders, missing altogether, containing one sentence describing what everyone already knows, or blatantly containing marketing BS. P.s. Can't agree more with Zoe that people will find a way to ignore/dismiss stuff no matter what we do. Hell, long-term users ignore in-your-face popups saying their tag name is misspelled and go ahead creating them. Apr 9, 2021 at 19:11
  • 8
    Given this Meta question is asking about git questions, there should, IMO, be more stress on "don't do it". As far as I'm aware, the issue of changing to "main" instead of "master" is a GitHub issue, not a general git issue. So, I'd say definitely don't edit posts which are just about git and not about GitHub. On the other hand, the advice you've given is good/appropriate for posts which are about GitHub. [It's possible I missed that there was an overall change to git. In which case, this would also be appropriate advice for git based questions which are not also GitHub based.]
    – Makyen Mod
    Apr 9, 2021 at 20:45
  • @Makyen I answered the body of the question, not the title.
    – rene
    Apr 10, 2021 at 7:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .