"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
No, reset (without a file argument) by default affects the index and
HEAD and leaves the working tree alone. (The index is where the
"add", "remove", and "to commit" state is stored, among
other things.)
The revision history itself is immutable except by "git gc --prune".
"git reset --hard" is exactly equivalent to "hg update -C", I think.
OK, thanks for the explanation.
So, for example if I do
# make changes
git commit -m "first"
# make changes
git commit -m "second"
git tag tip
git reset HEAD^
then the index ("git status", more or less) will show that I've got
the changes in "second" in the workspace, but HEAD will point to the
commit logged as "first", and a new commit will have the commit logged
as "first" as its parent. If I use the "--soft" flag, then the
index
will show that all of those changes are staged for committing.
Finally, I can do "git reset tip" and I'll be back where I started.
Ah, that's not the same has "hg update -C", which throws away your
uncommitted changes. 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"?
Do tags and branch points move too? I suspect not. (In git they
don't move when you rebase, but I don't use rebase to emulate patch
stacks in git.)
They don't.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta