2 ms·
Holy shit git! I need to reset my git repo to match origin, is it git reset hard --HEAD or git reset HEAD --hard? I'm like 90% sure they switch it with every
by Klathmon 11y ago
Holy shit git!
I need to reset my git repo to match origin, is it git reset hard --HEAD or git reset HEAD --hard?
I'm like 90% sure they switch it with every update.
- scrollaway 11y agoIt's just git reset --hard. HEAD is implied. Edit: To be more specific: git # the executable reset # the operation --hard # the type of reset being done (hard reset) HEAD # where to reset *to*. Defaults to HEAD if not specified.
- emodendroket 11y agoYou can just leave out HEAD since it is implied, but understanding a little bit about git, like what the head is supposed to be, would probably help you.
- lottin 11y agoFor rare commands that are repeated every so often history search comes in handy.