Use Git and Xcode with TFS
You can use Git to work in your local repository and then use Git-tf to check code in to TFS when it's ready to share with the team.
Create a team project
Once you've created your Team Foundation Service account, you'll want to create a team project. A team project is where you store all your source code, as well as tasks and builds. It's also a good way to get a team together to do some great work!
-
Go to your home page - https://[your account].visualstudio.com - to create a team project.

-
Name your project and choose a process template.
The process template defines how you manage your work: as a Scrum project, a general Agile project, or a more formal CMMI style project. Choose the template that's best for your team.
-
Click Create Project, wait a few moments, and you're ready to go!
Done. You have your very own Team Foundation Service in the cloud. Now, let's connect it to Visual Studio.
Enable basic authentication for your account
To use Git-tf with your visualstudio.com account, enable basic authentication.
-
Go to your team project's home page and open your profile.

-
Allow alternate credentials for this account.

Download and configure Git-tf
-
Download and extract Git-tf.
-
Add Git-tf and the Java runtime to your path.
export JAVA_HOME=/Library/Java/Home
export PATH=$PATH:$JAVA_HOME/bin:/git_tf
-
Go to the root of your local repository.
pushd /ws/FabrikamFiber
- To share your Git repository in TFS, configure the connection and check in your code. You'll be prompted for credentials.
git tf configure https://fabrikamfiber.visualstudio.com $/FabrikamFiber
git tf checkin
Or, if your team's code is already in TFS, you can clone a local repository using Git-tf.
git tf clone https://fabrikamfiber.visualstudio.com $/FabrikamFiber
-
If you don't want to be prompted for credentials every time you run Git-tf, you can store your credentials in your Git configuration.
git config git-tf.server.username fabrikamfiber4@hotmail.com
git config git-tf.server.password mypassword
Share your code
-
After you commit changes to your local Git repository, and you're ready to share them in TFS, check them in. If you've committed multiple changes locally, TFS will aggregate the local commits and check the changes in to TFS.
git commit -a
git tf checkin
-
If you're working on a task or fixing a bug that's tracked as a work item, indicate that when you check in. TFS will resolve the bug or close the task, and it'll link the changeset to the work item. That will trace through to things like build reports.
git tf checkin --resolve=21972
-
You can make sure you're working with your team's latest code by pulling from TFS.
git tf pull
Use git tf help to learn about the Git-tf commands.

Sign up for free