Reputation: 36166
I'm so tired of explaining benefits of using DVCS over CVCS to my teammates. Some of them scared of the learning curve, some of them see no reasons because for them: "tis the same fokin ting". Personally I'm so tired of TFS and its problems. Everytime when I need to work on some small "fix" I have to work on the main dev branch and shelve my stuff in and out, cause branching with TFS so darn painful compared to Git. I have to reconnect my VPN client every single time I switch from ethernet to wifi and that happens a lot.
So I started thinking maybe I could use Git locally and do whatever I want on my local repo, and when the time comes push it to TFS. I know it's possible, but what's the best way to do that? Can I just git init
the current repo and put the entire .git
folder into ignored list, so TFS wouldn't check it in or doing just that isn't simply enough?
Until the official update of Visual Studio comes, that will support both git and tfs, I have to use some hacks to do what I want.
Upvotes: 15
Views: 4717
Reputation: 36166
git-tfs https://github.com/git-tfs/git-tfs worked for me better. Easy to install. Easy to use. A bit slow though, but if you don't mind that - works just perfect
Upvotes: 8
Reputation: 70135
Yes, you are exactly correct - you just need to deal with .git in TFS. In general, everything GIT does is maintained in .git so if you have a way to keep it out of TFS (worst case is move out and then move back) then you can use GIT without problems.
Note that there may be other GIT related files to deal with, .gitignore being the most common example.
I've successfully overlaid GIT and SVN using awareness of .git and related files. (I know there is a git-svn package; but that wasn't workable for my specific need.)
Also, look into:
git init --separate-git-dir=<other-location-for-dot-git>
You'll still need to deal with a symbolic link in the local directory but perhaps TFS issues are easier to deal with.
Upvotes: 5