Reputation: 1350
I have never been in the position I am now and I am being asked to manage the GIT repositories for our project. While I know that there is no single "correct way" to do this, I was provided the following article about the most successful git branching model
I want to follow this workflow, so for our project we want the following branches:
master (contains the code currently running on our production environment) staging (contains the code currently running on our staging environment) development (contains the code that always reflects a state with the latest delivered development changes for the next release)
Our process will involve each developer being assigned tasks during a sprint cycle. Each developer will create a feature branch for their work that is cloned from the development branch. They will do the work required and when it is complete they will merge their branch into the development branch.
We are using GIT running on TFS.
My assumption (and this is what I need confirmed) is that I should create one main repository in TFS--let's call it JBenchView. After that I will have a master branch. I now need to create the development and staging branches within that same repository. This is what leads to the following questions.
git checkout -b branchName
or is there a faster/easier way)?Upvotes: 1
Views: 65
Reputation: 31207
If you want to do all that from the command line, you could install the gitflow scripts that will simplify the steps. There is also an extension to do it in Visual studio.
You could also use GitExtensions that have a plugin to do it (that I wrote ;-)).
But if you adopt such a complex workflow, especially for new git users, create the branches only when you need it and refrain to create the branches before that.
For the 4th point, the difference is surely that the developer in visual studio didn't pushed its newly created branch!
PS: I do not recommend to use git in visual studio, especially for beginners because the GUI is very confusing...
PS2: I do not recommend to begin straight on with the gitflow, except if you REALLY need it. You should take time to understand the aim of each type of branch. Have a look to the github flow for a beginning...
Upvotes: 2