What does the 'git reset' command do without any options?

advertisements

What does 'git reset' command will do without any other option? Will it reset the staging index with the head?


Exactly.

Without option, "git reset" is interpreted as "git reset --mixed HEAD".

git reset has three modes: soft, mixed, and hard (the default is "mixed").

Like many other git commands, git reset takes an argument which is a reference to a commit (a branch name, a tag name, a commit SHA, a relative reference like HEAD~2). By default, if no reference is specified, HEAD is used.

I suggest you read the last blog entry of "Progit", which explains in detail the "git reset" command: http://progit.org/2011/07/11/reset.html