How to get git and tfs to work side by side in MSVS2013?
Gah! We use TFS at work but my manager doesn't want to use it's branching feature to manage a large automated modification change that affects 200-300 files. Each file has to be viewed to confirm that the mod was legit. So instead, we are using TFS's shelving feature, where other developers will pull down the shelfset, merge with the trunk and confirm that the changes are legit. And then every so often I merge the trunk back into the shelfset. Sounds convoluted? IMHO, you'd be right. Although I think in this way, changes on the same line in a file on the trunk and on the shelfset would cause a conflict which if I'm not mistaken would not happen on a branch if I were to merge the trunk to the branch resulting in backing out my changes on the trunk? I'm actually not sure how this would be resolved, so any info on this would be useful.
So, in order to see and manage my changes in the shelfset and see what got merged in, I resorted to having a local git repository. It works well, but I find MSVS2013 defaults to git as the managing repository, keeping me from connecting with the tfs repository.
Is there a way to get MSVS2013 to play nice? I can't even get it to jump back to the TFS by telling it to use TFS database. :( It would be optimal if I could switch back and forth between both, but even if I could just lock it down to TFS that would help a lot and I would then just use git's command line interface.
EDIT : I have a workaround where I change the .git directory to something else, load the solution and then rename the directory back to .git. Is there another way to lock MSVS to use TFS more permanently?
I had a similar issue where we are using TFS and I wanted to use Git locally. I solved it like this. As far as I can tell Visual Studio 2013 keeps TFS as the source control and I can do all my git stuff from the command line withougt any side effects.
1) in the repo root rename the hidden folder .git to git.dir
2) in the repo root create a new file .git and add a line gitdir: git.dir
3) go to the now renamed folder git.dir and in config add a line under [core] worktree = ../
4) in .gitignore add git.dir/