On Mon, 24 Dec 2012 09:51:19 -0800 (PST)
Javier Garcia <tirengar...@gmail.com> wrote:

> in the man of "git reset" it says:
> *       git-reset - Reset current HEAD to the specified state*
> So..what happen if i dont specify any state? *something* changes?

The problem with understanding `git reset` is that this command
is overloaded with meanings [*], and it's hard to capture all of them to
satisfy the manual page's requirement for description to be a one-liner.

In fact, some of `git reset` invocations do indeed move the HEAD, but
some of them update the index or the work tree or both.  Yet some of
them do all three thing (notably, the famous
`git reset --hard <commit>`).

Since reading manual pages are hard (they're precise and up to the
point but usually lack description of "the big picture") I would
recommend to first read the "Reset Demystified" [1] article (which is a
part of the series of extensions to the "Pro Git" book providing more
in-depth discussions of certain topics).  This is a friendly
explanation of how various types of `git reset` invocations work, and it
certainly provides that "big picture view".

After reading this article, you can turn back to the `git reset` manual
page to learn the precise details of how it works, if needed.

[*] In fact, it's not really overloaded as grouping of the tasks this
    tool is assigned to do is based on the Git's underlying

1. http://git-scm.com/2011/07/11/reset.html


Reply via email to