Hi,
just to add to Junio's comments:
On Wed, 25 Jun 2008, Boaz Harrosh wrote:
But "reset" _means_ to discard something.
Frankly, we could introduce "git reset --hard --force --really
--really-i-mean-it --do-reset-the-fscking-working-directory-NOW", but I do
not think that it makes sense.
If you want to reset the working directory, you want to reset the working
directory. If you wanted to save the changes somewhere, you should have
done that. We have enough ways to do that.
Apparently not. So again, "reset --hard" means to reset HEAD, index and
working directory to the revision you pass (defaulting to the HEAD).
The fact that you do not lose the information which used to be HEAD, is
just a side-effect of Git storing all the revisions in one big graph. It
is _not_ implied by "reset", which, as I pointed out, means "re-set".
What would be a "nondestructive-discarding", /me wonders.
That is not "git reset --hard".
"move" to a new head is called "switching branches" in Git lingo (and BTW
in many other SCM lingos, too, so you might just as well get used to it),
and it is another command: "git checkout <branch>".
Incidentally, a friend just told me that "checkout" is everything but
intuitive, and he would have preferred "git branch switch <branch>", but
then settled for my proposed "git branch --switch <branch>", which I did
not have time to implement yet, unfortunately.
Ciao,
Dscho
--
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