Search code examples
gitgithubgit-reset

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?


Solution

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

    Source [bullet item #2]