5 ms·
What does "I don't think it means what you think it means" refer to?
by tarblog 12y ago
What does "I don't think it means what you think it means" refer to?
- christop 12y agoPossibly that `git revert` doesn't somehow remove the commit you've done, rather it creates a new commit removing the changes, along with a commit message saying which commit is being reverted.
- bkeroack 12y agoReverting a merge commit is the big danger zone. Let's say you are working on a feature branch and you accidentally commit it to the upstream branch before you're ready. Intuitively, you might then revert the merge changeset, continue working on your feature branch for a while, and then when you're done, merge it back upstream. That would be wrong. What will actually happen is that when you do the second merge, only the changes you made after the reverted merge will be applied to the upstream branch. All the work that was "reverted" in the initial mistaken merge will be missing, even after the second merge! This can be very confusing, since there's no indication to the developer where it went. It's just gone. The fix at that point it to revert the revert changeset. But the real solution is to never revert a merge.
- J_Darnley 12y agoAs well as what my sibling comments said, it is also a reference to The Princess Bride. Would you like to know more? http://knowyourmeme.com/memes/you-keep-using-that-word-i-do-not-think-it-means-what-you-think-it-means http://knowyourmeme.com/memes/you-keep-using-that-word-i-do-...
- pimlottc 12y agoI don't think it's specifically about reverting merge commits but rather the fact that "git revert" is quite different from "svn revert" which may not be immediately clear and may not meet everyone's understanding of the term "revert" - which is to say, it does not simply "get rid of" the unwanted commit but rather creates a new one that has the net effect of undoing that commit's changes.
- tricolon 12y agoI keep meaning to make an alias for it called "git anticommit".