Gokhan
Gokhan

Reputation: 317

Is "git reset --hard" the same as "git reset --hard HEAD"?

In order to revert changes in a working tree and index, this answer (https://stackoverflow.com/a/5812972/8278160) suggests that one run the following:

git reset --hard

Would running this be the same as running git reset --hard HEAD?

Upvotes: 8

Views: 743

Answers (1)

jhpratt
jhpratt

Reputation: 7120

Yes, HEAD is implied if not specified, so it's the same thing.

Source [bullet item #2]

Upvotes: 9

Related Questions