Skip to content

Instantly share code, notes, and snippets.

@thebigdatajedi
Created December 17, 2022 11:50
Show Gist options
  • Save thebigdatajedi/0c2be8942e90587d6cabe86445328985 to your computer and use it in GitHub Desktop.
Save thebigdatajedi/0c2be8942e90587d6cabe86445328985 to your computer and use it in GitHub Desktop.
This an explanation of what git reset soft does and how to do it. My bias is to do a git reset hard. I usually have to do them when I'm in a terrible place and the loss of code will be code I wasn to get rid off, the thing with the git reset soft is that it leaves your local files etc. the same. I just don't have much use for moving the HEAD but…
And if you reset --soft, it will move your HEAD to where they were , but leave your local files etc. the same:
git reset --soft <commit hash>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment