I’m working on a new branch. Basically I’ve messed my code up and would like to go back to master and start fresh from a new branch.
Would $ git revert get me back to the master?
or should I be doing the following:
$ git branch -D branch-name
I want to get rid all the code and current entire branch that is checked out.
The online documentation is a bit confusing – scared to mess everything up.
To get back to the
masterbranch simply use:If you also want to blow away uncommitted changes you can follow that with:
You can remove the unwanted branch using: