Reputation: 1701
The official SCM here at work is TFS. I use git-tfs to be able to work. Other devs here at the local branch of our company use StarTeam for local development branches (yes, there are SCMs out there worse than TFS). Now, some of us thinking about migrating from StarTeam to Git for our local development.
What is the best way to use git in combination with tfs for multiple users?
The best idea I had:
Might this workflow work? Does anyone have experience how something like that can be set up?
Upvotes: 0
Views: 221
Reputation: 1701
The current solution is basically the same as I outlined above. The main restrictions:
So... :
git tfs fetch
and the branches are reset to tfs/branchname
git tfs rcheckin --no-merge
(wrapped in a plugin for GitExtensions).:%s/tfs/TFVC/g
We are running this setup for some months now for 3 repositories and multiple branches. My colleagues get used to git and this workflow within a short time - a question every now and then but it becomes less and less. I'm moderatly surprised, how well this had worked out.
Upvotes: 0
Reputation: 23434
First TFS is not an SCM, it is an ALM platform. It provides two native SCM options, TFVC and Git.
Your best bet would be to create a new Team Project in your TFS server and when you are asked which SCM provider to use pick Git. This will give you something similar to GitHub or Bitbucket but enterprise ready with enterprise audit. You can then add this new TFS Git repo as an origin and push.
If you still have to use TFVC then I would suggest that in addition to the above you can push daily with Git-tfs between this server Git repo and TFVC.
You now have both a Git and TFVC copy of the same code with all of the history intact. Each of your coders can then clone the MyProject-Git and work happily away in Git.
You can then setup an automated and scheduled process to sync MyProject-Git and MyProject-TFVC on a regular cadence. All you need notification of is conflicts, but as everything is server side and backed up you can do that at your leisure.
Upvotes: 1