What does ‘git reset’ command will do without any other option? Will it reset the staging index with the head?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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://git-scm.com/book/en/v2/Git-Tools-Reset-Demystified