login
Header Space

 
 

Re: abouy git reset command

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: amishera <amishera2007@...>
Cc: <git@...>
Date: Tuesday, May 13, 2008 - 4:33 am

amishera <amishera2007@gmail.com> writes:


If you mean by "undo last commit" reset HEAD pointer and index state,
then yes.
 

git-reset is all about setting the HEAD pointer, or to be more exact
to set current branch (current head) reference.  There are three
degrees of it:

 --soft changes only current HEAD
 --mixed (default) changes current HEAD and index file
 --hard changes current HEAD, index file and working tree

If you don't give <commit-ish>, git-reset defaults to HEAD,
i.e. current version.  Thus "git reset --soft" is no-op, it does do
nothing.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
abouy git reset command, amishera, (Tue May 13, 3:07 am)
Re: abouy git reset command, David Tweed, (Tue May 13, 8:34 am)
Re: abouy git reset command, Jakub Narebski, (Tue May 13, 4:33 am)
speck-geostationary