58

There is the old and quite popular question How do I edit an existing tag message in git?. So far, it attracted 10 (+2 deleted) answers.

  • The good thing is: The currently accepted and most upvoted answer seems to be correct.
  • The bad thing is: The accepted answer has only "recently" been edited (in 2018). Before the edit, the answer was not correct, provoking several competing answers that point out that the accepted answer is incorrect and suggest better solutions. These solutions however are exactly what the edited accepted answer proposes.

Overall, this leads to a lot of confusing and potentially misleading information due to the (now obsolete) claims that the accepted answer was wrong.

Is there anything we can do about this? Rolling back the edit that fixed the accepted answer seems like a very bad idea. On the other hand, with the edited accepted answer the answers by Eric Hu, Sungam, stanm and liuyang1 are (mostly) obsolete.


Background:

  • The accepted answer by Andy originally suggested git tag <tag name> <tag name> -f -m "<new message>". This has been changed to git tag <tag name> <tag name>^{} -f -m "<new message>" in 2018 (note the ^{}).
  • In 2013, Eric Hu suggested git tag <tag name> <tag name> -f -a. Much later (2019) this answer has also been edited to git tag <tag name> <tag name>^{} -f -a.
  • Sungam's answer seems to be the first that proposed git tag <tag name> <tag name>^{} -f -a, stating that this is an "improvement".
  • stanm's answer discusses the shortcomings of the (original revisions) of the first two answers and provides an alternative to Sungam's answer.
  • liuyang1's answer explains that the accepted answer is wrong – but this refers to the original revision.

Overall, this is a big mess. I think in an ideal world Shungam's answer would be accepted and upvoted. Then the edits to Andy's and Eric Hu's answers could be rolled back and everything would be consistent. But given the very "nonlinear history" of this Q&A I am not sure how it can be cleaned up.

13
  • 6
    "I think in an ideal world Shungam's answer would be accepted" - no, because it worked for OP when the question was posted, and accepts != up to date at this exact moment. Accepting isn't and never has been a metric to indicate, with no uncertainty, which answer is currently up to date and correct (and secure and whatever other metrics/attributes an answer can have) Commented May 26, 2021 at 16:19
  • 50
    We can probably file this under "more reasons why accepted answers shouldn't be pinned", and also why the Outdated Answers project needs to exist.
    – zcoop98
    Commented May 26, 2021 at 16:50
  • 2
    Since by your own admission all answers are effectively the same, why shouldn't we delete them?
    – Braiam
    Commented May 26, 2021 at 17:19
  • @Zoe I'm aware of what the checkmark means and do not disagree. This is not what I wanted to express with that sentence. What I meant is that if Shungam's answer had been the one that helped the OP and received the checkmark, there would be less of a problem now.
    – CL.
    Commented May 26, 2021 at 18:19
  • 2
    @Braiam Well, maybe that is the answer – I don't know. Do you want to post your suggestion as an answer and let the community vote? One argument against deletion (at least in case of Shugam's answer) could be attribution: the accepted answer is not the one that initially proposed the correct solution. Deleting the answers that got it right before the accepted answer has been revised attributes the correct solution to the wrong author.
    – CL.
    Commented May 26, 2021 at 18:24
  • 4
    Why rolling back edits that improve answers? SO is not Wikipedia where everyone works on a single coherent solution. I guess we will have to live with redundant answers. If anything I would kind of propose a merge mechanism for identical answers with shared rep afterwards or alternatively deletion of any later answers that simply reproduce previous answers. But that wouldn't be easy. Answers that become more and more similar looks like a reasonable thing to me. In this case the best is probably to just leave them all be for now and just remove the references to a non-anymore bad answer. Commented May 26, 2021 at 21:38
  • 1
    @Trilarion - re: shared rep - there is even no need to implement anything for it to work - since the rep on well-received answers >= 60 days is preserved on deletion, such a merge could follow the same pattern. For example, 2 or more answers edited to identicality could be merged into a single community wiki (to retain the shared ownership)
    – 0Valt
    Commented May 27, 2021 at 4:04
  • 4
    @OlegValter Sounds good to me, but community wiki stops generating even more rep (if I remember correctly). What if both the authors of the more or less identical answers don't want that and insist that their answer is somehow distinct or better or was there first? Could we solve these possible disputes somehow? Commented May 27, 2021 at 9:44
  • 1
    @Trilarion - hm, I don't know if that would be possible. When we close posts, there are always those who think the closure is unjustified - I suppose the same would be true about answer merging. As for how to address it - I am not sure, there is a temptation to add yet another review queue analogous to close/reopen votes, but it does not seem like a particularly good idea.
    – 0Valt
    Commented May 27, 2021 at 10:40
  • @Zoe That line of thinking would lead to a community encouraging of dupe questions, to document up-to-date practices. I think that everybody here would agree that is not a good direction to take the site(s).
    – dotancohen
    Commented May 27, 2021 at 17:56
  • @dotancohen I don't entirely understand what you're trying to say here - accepted answers are unrelated to dupes, both dupe answers and dupe questions. The acceptance system is more or less set in stone (though OP could come back and change the accepted answer, they don't have to, and the community shouldn't have a say, in my opinion). However, a few details surrounding their handling, such as unpinning the accepted answer and other answer deprecation features, like the one currently being tested for a lucky 1%, are in a completely separate category that I'm not trying to take a stance on(1/2) Commented May 27, 2021 at 18:24
  • in this comment section, because the topics are too huge to cover in just comments. The system behind accepts and its implication still remain unrelated to dupes Commented May 27, 2021 at 18:25
  • 12
    They should probably have used Git to maintain the history. Commented May 28, 2021 at 13:25

2 Answers 2

59

The beauty of Stack Overflow is that old answers can be edited by anyone, especially high-rep users, in arbitrary ways, not just rolling stuff back.

In this case, edit answers which make outdated references to contents of other answers, edit to say "in an earlier version of <somebody>'s answer" (avoid "the accepted answer" because that can change). You might even go so far as mentioning that the answer is now functionally identical, too.

Or for answers that are different from the accepted answer and fully make sense without comparing themselves to other answers, simply remove the reference. Some kind of comparison of the advantages of one way vs. another can be an appropriate edit if the editor is sure enough they understand the situation to describe it accurately, to point out when you'd want to use this answer vs. when you'd want to use another answer.

(These edits that remove stuff should be done by user(s) with 2000+ rep, as reviewers won't have context to know why the change is needed - the improvement is in relation to other answers, not the question or that answer. Just adding "an earlier version of" should be fairly obvious to any reviewer, but removing references might not look good to reviewers. An edit message of "accepted answer has changed" should be enough, but you might take up reviewers' time examining the situation. So best to sidestep the review queue by having a higher-rep user do it.)


If the owners of those answers in need of editing are still active and want to do anything more / other than that, they can edit themselves. Old answers do sometimes need maintenance, and if users don't do it themselves, it's something other community members should do.


The two problem in this situation are:

  • duplicate answers
  • outdated references to old versions of other answers.

The 2nd part is pretty trivially fixable, and in a way that leaves an explanation at least for future readers. Hopefully in a way that's good enough that mere duplication is understandable and not a big enough problem that anyone feels distracted by a desire to invest further time on cleanup. (Other than maybe some users deleting their own answers if they're no longer relevant.)

Rolling stuff back seems like a worse solution.

4
  • 6
    " Old answers do sometimes need maintenance, and if users don't do it themselves, it's something other community members should do" yet, some community members would call arms if anyone does it.
    – Braiam
    Commented May 27, 2021 at 10:23
  • 16
    @Braiam: Those people are wrong, IMO, and I think the unanimous upvotes on this answer reflect that community consensus. (At least for this narrow level of maintenance that's about changing the fluff, not changing the true programming content. Objections are more likely and sometimes more reasonable if we're talking about updating code, not just adding notes about when an answer is appropriate (e.g. "without new feature / version X") Commented May 27, 2021 at 17:36
  • 3
    That's the thing, they agree with you and at the same time disagree with whoever does that. The cognitive dissonance is strong on those.
    – Braiam
    Commented May 27, 2021 at 18:02
  • 7
    Yes, it would also be helpful to have 2000+ rep to edit without review as well, as reviewers tend to not care enough about the context of the edit and will generally reject them.
    – Enthus3d
    Commented May 27, 2021 at 18:03
3

Let's have a real close look at the timeline of the linked Q&A:

  • On 2011-10-18 20:21:11 the question was asked.
  • It immediately received two answers by Andy and manojlds
  • On 2013-01-02 it received another answer by Eric Hu
  • On 2014-05-08 it received another answer by Sungam
  • On 2015-03-12 it received another answer by stanm
  • On 2016-01-05 it received another answer by h0tw1r3
  • On 2016-07-07 it received another answer by liuyang1
  • On 2018-03-10 it received another answer by VonC
  • On 2020-03-06 it received another answer by rubo77
  • On 2020-07-28 it received another answer by DylanYoung

Deleted answers are excluded. Except for the first two answers which were given at the same time we can safely assume that each new answerer had read and knew all about all other existing answers (in their state at that time) when a new answer was written (or edited).

Now let's have a look at the answer histories one by one:

  • manojlds suggested git tag v1.0 -f -m "actual message" and did not edit his answer later
  • Andy suggested git tag <tag name> <tag name> -f -m "<new message>" and on Mar 23 '18 Stevoisiak edited his answer to git tag <tag name> <tag name>^{} -f -m "<new message>"
  • Eric Hu suggested git tag <tag name> <tag name> -f -a and on Jun 13 '19 John Kugelman edited his answer to git tag <tag name> <tag name>^{} -f -a
  • Sungam suggested git tag <tag name> <tag name>^{} -f -a, his answer was edited but essentially the answer stayed the same
  • stanm initially suggested 3-4 lines of commands (deletion followed by creation), and one day later replaced it with an extensive text discussing Sungam's answer, a few months later re-introduced the idea of deletion followed by creation
  • h0tw1r3 refers to some other answer (probably Sungam's) and creates some convenience code around it
  • liuyang1 points out that Andy's answer is wrong and suggests git tag <tag-name> -f -a
  • VonC suggests using the --edit option that is new in Git 2.17
  • rubo77 suggests a special solution for a GUI called smartgit
  • DylanYoung is so far the last to the party. In his answer a convenience script is given based on "existing answers" (without specifying which ones)

That information allows us to retrace, how answers became redundant:

  • manojlds's and Andy's answers given in 2011 both go in the same direction, but were both not optimal (missing ^{})
  • Eric Hu's answer given in 2013 also went in the same direction, was maybe slightly different than Andy's and was not optimal (missing ^{})
  • Sungam's answer given in 2014 seems to be the first one having the ^{}.
  • In 2014 there existed 4 quite similar answers and the latest one by Sungam was a better than the others.
  • stanm's answer in 2015 followed up on Sungam's answer, added explanation and the idea of deletion/re-creation instead of update
  • h0tw1r3's answer in 2016 adds some convenience code around Sungam's solution
  • liuyang1's answer in 2016 proposes yet another slightly different solution, however, not as good as Sungam's (it seems)
  • VonC's answer in 2018 adds a new solution based on a new version of Git
  • Stevoisiak's edit to Andy's answer in 2018 is the first occurring redundancy basically making Andy's less good answer equal with Sungam's answer
  • In 2018 there were 8 answers with two equal answers (Andy's and Sungam's with Sungam having written it first), three somewhat inferior answers (manojlds', Eric Hu's and liuyang1's), two convenience additions to Sungam's answer (stanm's and h0tw1r3's) and an alternative (VonC's)
  • John Kugelman's edit to Eric Hu's answer in 2019 makes it also equivalent to Sungam's
  • rubo77 adds a special case solution and DylanYoung adds another convenience solution based on Sungam's answer
  • Currently there are 10 answers with 3 answers being the same with two of them (Andy's and Eric Hu's) having been edited to look like the one by Sungam given in 2013, which apart from the new possibility showed by VonC still seems to be a valid, good solution

And now the conclusion: Don't blame the people, they did their best to answer the question or improve existing content by edits. Blame the system. Giving new answers even if the content is only slightly different is an inherent property of how StackOverflow works (reputation, control over edits, ...). It naturally has to result in redundancy.

Stevoisiak and John Kugelman improved the answers by Andy and Eric Hu. A rollback of edits that improve posts is not useful and should not be done even though redundant answers aren't that helpful either (but still more helpful than inferior answers). A deletion of the answers by Andy and Eric Hu might be too extreme (although there is also not much value in them given that there is Sungam's answer already). In the end we simply have to live with issues like this or change the system (i.e. allow merging of answers with shared authorship and shared rep gain) but that would be a larger discussion. StackOverflow is not Wikipedia where the approach is a bit more coherent. An overall more coherent approach would probably have helped here.

I did a couple of edits to make the whole situation clearer (who basically refers to whom) and upvoted the two most helpful answers (Sangum's and VonC's) that also were the first. I don't see what more could be done now, except for unpinning accepted answers and more consequently only upvoting those answers who had it right first.

You must log in to answer this question.

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