Here's an experiment to work locally on a Mac using Git and my editor of choice -- while integrating well with Microsoft TFS which houses company-wide code.
If you want to work completely in Windows see:
-
On Windows running in a VM, use TFS normally for checking out branches, and checking in company-wide code.
-
On Mac OSX, use Git and my editor of choice to work locally.
-
Make it easy to go back and forth between my local Git repo, and company-wide changes in TFS.
-
Do all the normal TFS setup on Windows in VMWare Fusion.
-
Check out your branch into a folder.
-
Share that folder with your Mac via Windows Sharing.
-
On Mac, connect to Windows via SMB. Now you should see your branch in /Volumes/[branch-name-here]
-
cd /Volumes/[branch-name-here]
-
Initialize git repo via
git init
-
Turn off auto.crlf via
git config core.autocrlf false
. Why? Since this is a local repository and line endings aren't really an issue, auto-converting them to the recommended LF via auto.crlf=input Git config setting creates slow Git operations on large trees since it has to continually do the LF <-> CRLF conversion on diffs, status, etc. If this were a public repo with line-ending issues then it makes sense to http://help.github.com/dealing-with-lineendings. -
In my case I just want to use git with one folder in the root of the repo, so I added the other files/folders into a .gitignore file so Git doesn't remind me about those Untracked files.
-
Another suggestion for large trees may be to be more selective in .gitignore (to exclude images, assets, binaries, etc) so less for Git to worry about.
-
git add
your .gitignore(s) and files/folders of interest. -
git commit -a
-
On Windows in TFS, check-out files you want to work with in TFS so it recognizes changes made in the filesystem (and removes the read-only flag).
-
On Mac, make changes locally using Git and your local editor. Keep iterating.
-
When you're ready, go back to TFS and check your files in.