4 ms·
Nope. It stops and explicitly tells you "I cannot do that, because that would overwrite files X, Y and Z.". Why would you think otherwise?
by lomnakkus 12y ago
Nope. It stops and explicitly tells you "I cannot do that, because that would overwrite files X, Y and Z.".
Why would you think otherwise?
- oconnor663 12y ago"If a path is specified," which is correct. The checkout command is like two commands in one.
- mercurial 12y agoNobody ever accused the git command line UI of being user-friendly and well thought-out.
- throwawayaway 12y ago> Not to be rude, but I'm baffled why a professional programmer could be "wary" of using a VCS. Or is it just git in particular? (More understandable, there's a learning curve, but nearly every major project is using it. Git's proven itself.) it's a learning curve alright.
- lomnakkus 12y ago(I'm not sure "if a path is specified" was actually part of the comment when I responded, but I'll grant that...) Ah, missed that -- and I concur with the other commenter that this is bad UI. However, I don't think this qualifies as particularly dangerous or surprising behavior. You're explicitly giving a file name after all -- you had better read up on what the command does if you're doing that. ("rm X" is pretty good precedent.)
- lomnakkus 12y ago(Self-reply and all, and I'm not sure anyone actually reads these old threads...) Does "checkout -- some-file" not add an entry to the reflog? (Which, btw, is one of the most important and useful commands ever in the history of VCS.)