Restore all code to previous commit (which was before a merge)

Viewed 35

Still understanding Git, so this may sound elementary. All I want to do is have all my code start back over to the commit dfa7afd, however this was before a merge shown below:

enter image description here

Also, this is what my GitBash is showing right now:

enter image description here

I am not exactly sure how I got one commit ahead of origin/ticket-3, but I just want to restore all my code to the dfa7afd commit. Appreciate the help.

1 Answers

NOTE: This will reset ALL local modifications

git reset --hard <commit>

So, in your case:

git reset --hard dfa7afd

This will restore your repo to the commit specified

Related