Git and tfs: can I only link the central repo to tfs?

I would like to move my command using TFS for version control on git.

Is there any reason why I should not do the following:

  • Create a central git repository using git -tfs
  • Ask each developer to clone the central repo, pull it out and click on it.
  • And then only update tfs from the central repo?

Thanks!

+4
source share
3 answers

Create a central git repository using git -tfs

This can be dangerous because TFS has a central repository with everything in it.
The resulting git repo can become huge (not easy to clone)

I would recommend doing a few git-tfs to create some small git git-tfs .

+3
source

Due to the fact that the interaction in Git and TFS, git-tfs, is not perfect (due to the fact that the main characteristic of Git is that you cannot modify the commit after creation and that git-tfs does not work with bare repositories ), placing the central Git repository before TFS is not straightforward ...

I assume that your whole team will use this thread otherwise, you may stop thinking about the idea of ​​doing this (due to a merge conflict you will have to manage) ...

Since git-tfs does not work with an open repository, you will end up with actually 2 Git repositories that you must synchronize. 1st where you click (naked) and second, which interact with TFS (not naked, where you use git-tfs).

Then you have 2 options: a) you only accept one commit in TFS, even if you have multiple Git commit (use the git -tfs 'checkin' command) b) you want to replicate each Git commit to TFS (use git -tfs 'rcheckin' commit)

The first case a) is not the best, but some scripts and Git hooks are easier to solve, because there is always only a new Git for synchronization between two repositories.

The second case b) is the only acceptable for me, but much more difficult to solve, because when you synchronize the Git repository with the git -tfs 'rcheckin' command, for each commit, Git is new and the synchronization script will be much more difficult to write (I don’t even know whether the whole merge conflict can be resolved). I started writing these scripts, but stopped because it wasn’t worth the effort (especially now that Visual Studio 2012 solves the reload problem, where every time the solution files are reloaded). If you want to do this, the scripts in the column below are a good step from where to start ...

In conclusion, I think this is not worth it. You can find a local workflow with git-tfs, which is pretty simple and doesn't need a central Git repository ...

But if you still want to have a central Git repository, you can check out this post ( http://sparethought.wordpress.com/2012/08/23/my-environment-for-day-to-day-work-with-git -tfs / ) hybrid path (commit for TFS and fetch from git) that works.

+1
source

Team Foundation Server 2013 now supports Git as the source management repository for Team Project, and Visual Studio Tools for Git provides Git access built into Visual Studio ( add-in for 2012 , ships in the box since 2013).

0
source

Source: https://habr.com/ru/post/1390758/


All Articles