How to use git tfs with a team
Asked Answered
S

3

7

I recently started using git tfs as a bridge between working and committing locally with git and then comitting to tfs to go through our continuous integration system and share with team members.

I would like to start collaborating with my team using git for source control to share branches and changes, then eventually checking in to tfs for continuous integration.

Is that something I can do, or is git tfs only for one person working locally?

Shrift answered 14/10, 2011 at 0:42 Comment(1)
I don't know git-tfs, but at the very least, if only one repository actually uses git-tfs, and the rest interact with that one just via normal git operations (pulling into it, probably), it essentially has to work. Whether everyone can use git-tfs from their own repositories and pull from each other depends on how git-tfs handles the metadata representing the tfs side of things, and that I don't know.Oina
M
2

We have just started to use Git, Github and Git TFS. We are in the process of moving from TFS to Git, and Git TFS is working great! We still need TFS around for a short while longer while we move our build scripts to read from Github instead of TFS, but until that day comes we have to copy the changes back in to TFS.

No, Git TFS isn't strictly a one user system, but I guess it comes down to how you chose to use it. In our system one developer checks in the results from a dedicated branch on Git in to our TFS master branch using Git TFS when we need to copy the new changes back in to TFS (to trigger the build scripts). However, up until that point we just use Git and Github for all work and code collaboration.

As has been mentioned, the 'Git TFS bootstrap' command can come in useful for the developers that didn't perform the initial checkout of code from TFS since this command copies the necessary TFS information to the local .git/config file pointing them at the correct TFS branch. If they ever want to pull or checkin then they will need this first along with Git TFS installed on their local machines.

Memphis answered 7/12, 2011 at 13:35 Comment(0)
T
0

This page on the git-tfs wiki seems relevant: https://github.com/spraints/git-tfs/wiki/Bootstrap

bootstrap is useful if you create a TFS clone and share it with a colleague who then needs to interact with TFS. While two identical invocations of git tfs clone will produce identical repositories, git clone is always going to be faster than git tfs clone. So, I would guess that most people who want to collaborate on a TFS project using git will benefit from this command.

Tetradymite answered 19/10, 2011 at 0:35 Comment(1)
As the documentation says, bootstrap helps out when cloning a repository from git, then bootstrapping it to point to a TFS repository. This will allow another user to easily start to interact with his local git and TFS, but will cause collaboration trouble if you try to work with a shared git repo as well.Big
H
0

On my project, I cloned the TFS Repository with git-tfs and after I zipped the directory and give it to all the developpers (or just share the directory over the network to allow them to copy it). It works perfectly well and every one could fetch and commit in TFS and share branches using git!

Homoeroticism answered 6/12, 2012 at 10:30 Comment(2)
May I ask a question? If someone commits in git, then push to tfs, then pull from tfs to git, will the changeset just pushed into tfs get pulled back to git? so two commits with same content but different commit id?Clotilde
Yes. Because git-tfs need to add metadata to commit message.Homoeroticism

© 2022 - 2024 — McMap. All rights reserved.