I just created the default repository pointing to origin/master
I would like to create a release and a production branch
Should I create a git branches from origin/master itself
e.g. git branch release and git branch production
or
Should I create origin/production from origin/release
git branch release
git push origin release
and
git checkout release
git branch production
What would be the prefered approach
I think you are confusing the concepts here.
It doesn’t matter from which branch you create the new branch, the most important point is from which commit you want it to start.
Branches and tags in git are just a pointer to an specific commit (which has a history represented in a DAG). The difference is that tags usually stay static in time, and branches usually change as the coding progress.
So basically, when you get a point in the history where you have your first release, create a
releasebranch pointing that commit. (I’d recommend to tag it too.)I’m not sure what are you trying to achieve, probably you really don’t need branches, and tags would be enough. I’d recommend you to read pro git book to get more familiar with the concepts of branching (pro git’s “Tagging” chapter) and tagging (pro git’s “What a Branch Is” chapter) before making these decisions about your repository.