I'm trying to do the following thing in git:
- Go back a few commits (master branch)
- Create a new branch
- Restore the latest commit on the master branch (go forward)
The order is not important, it could be done like:
- Create a new branch and switch to it
- Go back a few commits (erase them from the branch history)
How can I do this?