I think that is a great idea. The thing that I found most confusing
when learning git is that variations on a single command often have very
different effects. My pet peeve is the over-versatile "git checkout":
git checkout BRANCH : Check out a branch. This is the functionality
that I would expect from a "checkout" command.
git checkout -b NEWBRANCH OLDBRANCH : For me this was unintuitive,
because (IMO) the main effect of the command is to create a new branch.
(I consider that more significant than the checkout because it has a
persistent effect on the repository.) Therefore, I would expect this
functionality to be provided by "git branch" (something like "git branch
--checkout NEWBRANCH OLDBRANCH").
git checkout -b NEWBRANCH : This is even more unintuitive, because no
content is being checked out at all. This should be written "git branch
--checkout NEWBRANCH".
git checkout -- PATH : To me this is again a totally different
operation. The other uses of "git checkout" are safe; they don't lose
any information. But this usage discards the working copy changes
irretrievably. Such a different operation deserves a different command
with a "dangerous-sounding" name. I think this functionality should be
made more easily accessible via "git reset", as has been suggested
elsewhere on this thread. (Unfortunately "git revert" is already taken.)
git checkout BRANCH -- PATH : This is even more perverse. Usually
"check out" makes the working copy more similar to a version in the
repository. But this command makes it more different.
Michael
--
Michael Haggerty
mhagger@alum.mit.eduhttp://softwareswirl.blogspot.com/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html