I’m a programmer working on ASP.NET code in Team Foundation Server and Team Explorer.
I’ve usually worked on projects alone but this time, however, there are two of us on this project, me and a second programmer.
I’ve only ever used version control for myself and now I need a strategy so that me and the second programmer don’t interfere with each other’s work, especially if we need to make changes to the same file.
I’m reading through the Azure DevOps Services documentation such as the ones here:
https://docs.microsoft.com/en-us/azure/devops/repos/tfvc/branching-strategies-with-tfvc?view=azure-devops
and here:
https://docs.microsoft.com/en-us/azure/devops/repos/tfvc/effective-tfvc-branching-strategies-for-devops?view=azure-devops
Unfortunately, the documentation doesn’t seem to answer the questions I have. For example, according to the “Start with a simple branching strategy” section for the “main-only” branching strategy, do both programmers work on the main branch? If so, what if there’s a conflict when we work on the same file, or worse, the same method?
Does a programmer put a lock on the file to prevent that from happening? Our managers and supervisors have told us to figure this out between the two of us.
Should there be a branch for each programmer? In this case, there’d be the main branch, then a sub-branch for me and another branch for the other programmer? Then code would get merged into the main branch. Is that the recommended way?
Finally, for a small two man team like this, is Team Explorer the better way or should we perhaps consider GIT as the repository. In that case, would we be using TFS with GIT?
Please advise on how I should get started.
Thanks in advance.
Unlike Git branches, which are repository-scoped, TFVC branches are path-scoped and therefore not as lightweight.
- the files is to big and you didn't follow the Separation of Concerns principle
- your requirements are not clear and your chosen development management strategy did not react accordingly
Normal work, where you edit something at the beginning and the other developer at the end of the file doesn't require locking as it is not parallel. And this scenario is handled by the used code repository software.
When you don't know how to use ADO or git, then you should look at SVN and agile (scrum) development with more than one daily standups. SVN is easier to handle and understand - drawback no distributed repo - and when you're new to this, then the most important factor is to talk as often with your coworker about what your actually working on and what you'll do next.