@marcogt Thanks very much for your question!
Git is the correct way to go with what you are describing. From the master branch, you would create a sub-branch with which you will do whatever work you need to, and then when you are finished, you can then merge your changes up to the master branch. To directly answer your question, while you may initially have multiple versions of your project because of creating the new branch, once you are finished doing whatever work you need to, and have merged your changes to the master branch, you can then delete the branch you created so that now you are left with the single Master branch you started out with.
As @shogunkaramazov correctly recommended, you really should check out the courses on Git that we offer to give you a clearer, and more thorough understanding of Git.
I hope this helps!
All the best!