I just started on a new project and I'm using GitLab with SourceTree. I had created a branch (origin\master) but I did the mistake of using this branch for my development, so I pushed my first few changes to this branch. Now I learned that this branch should actually have the production version and that an origin\develop branch should be used for development.
Is there any way I can rename the master branch to origin\develop and somehow create a new origin\master branch with the original version of the application?
I'm the only developer in the project so it won't affect anyone. If possible, if you can explain how to do it in SourceTree since I don't use the command line git. I'm more familiar with SourceTree.
You could try something like this. Answer modified from this great answer, to suit OP's needs.
git branch -m master develop # rename master on local
git push origin :master # delete master on remote
git push origin develop # create develop on remote
git checkout -b master develop # create a new local master on top of develop
git push origin master # create master on remote