"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
Michael Sperber writes:
> Does "git reset" just preserve the changes (i.e. re-apply the
> uncommitted diff on top of the revision specified), or keep the
> entire "working copy"?
git reset leaves the working copy alone. No patches applied or
reversed, just an in-memory operation on the index, and a change of
HEAD.
Once again this is an unfortunate UI. The working copy is changed if
you specify the --hard flag. That makes sense (YMMV), "reset" is an
operation on the index, and the --hard flag says "after resetting the
index to <commit>, sync the hard drive to that index". Or a file
argument. That is pretty unintuitive to me, I would call that
"checkout".
A checkout does not remove files. A hard reset, in contrast, will
remove those files from the working copy that are in the index before
the reset, and are not afterwards.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta