-1

I work with senior developer on a project. But when we work on same files, merge conflicts are happening. We use Microsoft TFS (or Azure DevOps) (that's a Version Control system created by Microsoft) to quickly share changes. Does it support branching and merging workflow, like Git?

We won't switch to Git, that was discussed earlier.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Ivan P.
  • 832
  • 2
  • 9
  • 26

1 Answers1

1

Yes. Team Foundation Version Control, or TFVC for short, supports branching and merging as well as passing Shelvesets (similar to a git stash) between users.

The "feel" is a lot less lightweight though, since TFVC can't switch branches in-place. You'll need to either setup 1 really big TFVC workspace, multiple workspaces or reconfigure workspaces.

There is also a utility called git-tfs with which you can locally use git, have multiple branches and sync changes against a central TFVC repository.

Whether working in Git or in TFVC, when working in the same files, you'll end up having to merge changes and resolve conflicts. That's just the nature of editing the same file with more than one user on separate machines. TFVC does have an exclusive lock feature, but it only works when all users have configured their environment with the Server/Remote TFVC workspaces.

See also:

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • If I understand it right, I should add my changes to Shelveset instead of directly comitting them, and then ask my supervisor to get that Shelveset and merge changes from it to repository in its current state, right? – Ivan P. Sep 02 '22 at 10:26
  • That is one option, but I'd encourage everyone on your team gets more comfortable with merging and conflict resolution. the more people, steps and handoffs you add to the process, the longer it takes and the greater the conflicts you'll need to merge. Could you work closer together with your colleagues and pair up when people need to work in the same area of the code? – jessehouwing Sep 02 '22 at 11:10
  • What may help you as well, is the "Incoming Changes" lens in Codelens. It will tell you when people have changed and checked in a file you're about to edit, it can even check across branches: https://devblogs.microsoft.com/devops/new-codelens-indicatorincoming-changes/?WT.mc_id=DOP-MVP-5001511 – jessehouwing Sep 02 '22 at 11:16
  • I really wonder why you couldn't move to Git. I'd recommend you do though. TFVC hasn't seen real improvements in years and is way to heavyweight for modern software development. Git would help your team work better together and te tool support in general is much better. – jessehouwing Sep 02 '22 at 11:20
  • Do you happen to know how to solve this issue here: https://stackoverflow.com/questions/73597813/azure-pipeline-unexpected-end-of-json-input – CodeMonkey Sep 04 '22 at 08:54