0

I'm trying to build out a feature on an app, so I started a branch. I'm a couple hours into building my feature and now I realize that I have a mess. I generated a model and a bunch of changes, all I want now is to go back to my last commit and start over with a different approach. How can I delete all my changes and simply go back to the git repo head and start over schema and all?

Bitwise
  • 8,021
  • 22
  • 70
  • 161

1 Answers1

1

reset hard - Make sure you are permanently deleting all the changes:

git log  #get your last commit id
git reset --hard commit_id
dp7
  • 6,651
  • 1
  • 18
  • 37