Anything you do, you create a branch for it, when you're done you merge into the main branch, and you can leave your old branch or delete it. Usually you It's good to have branches numbered and with a useful title. Having branches makes it easy to work on different things at the same time; say you are working two days on a new feature and in the middle of it you find a bug that needs fixing, you can do that easily by using two branches.
When you have old branches that you don't care about anymore, you can delete them. Make sure that either the git repository is either stored on an external server or gets backed up, so you always have a backup.
And assume you make mistakes-you don’t want your mistakes in your master branch. So never commit directly to master.