I have a brand new project on VSTS which is still empty. I haven't checked in anything yet.
I want to create two branches i.e. Develop and Production.
How do I do this? I see no options to create branches neither on the portal nor within Visual Studio 2017.
The idea is that I check my project on my local machine into the "Develop" branch and not into the root of the project repository on VSTS.
BTW, I'll be using TFVC for the project.
UPDATE:
Inside Visual Studio, I connected to the project repo on VSTS using Source Control Explorer. I then right clicked the empty repo and clicked to create a new branch but here's the error I got:
You create branches from within Visual Studio (or from the command line via tf.exe
). Create your trunk branch by adding a folder and checking it in, then create branches from that. The act of branching from a folder that is not already a branch will turn that folder into a branch.
As an aside: Having a separate "production" branch doesn't serve much purpose in most cases. Create a trunk (the TFVC convention is to call it Main), then create a Development branch off of it. When code is ready to ship, merge it back to Main and build/deploy from there.