I'm sure this is a stupid newbie question. I'm not sure why I'm finding all of this so confusing, but I am.
I managed to connect my local files to a bitbucket repo for a live website that I have using sourcetree. They are in the main branch of my repo. What I'm trying to understand now is how to setup my development files to be in a development branch of the repo, so I can work on changes without affecting the live site files. Where I'm getting confused is that I have one folder locally on my computer for the live site files, and another folder for the development files, and I can't figure out how to point the main branch to one directory and the development branch to the other directory (both already exist on my computer). So that my live site files are pushing from one folder to the main branch in bitbucket and the development files are pushing from another folder to the development branch in bitbucket. I hope I'm being clear about this.
Perhaps this is not the correct use of branches and I need separate repos for this, but then I don't know what the branches would be for. In the end, I want to merge the changes to the main branch once it's tested and ready to go live.
Any help on this would be appreciated.