Use Git and Xcode with TFS
Create a Visual Studio account
If your team doesn't have a Visual Studio account, create one.
-
Create your team's Visual Studio account.
-
If you're not already signed in with your Microsoft account, you'll do that here.
If you don't have a Microsoft account, sign up for one.
First time signing in to Team Foundation Service with your Microsoft account? We will ask you for some extra information so that we can personalize your experience. If our Terms of Service have changed since you last signed in, you may be asked to agree and confirm that your information is up-to-date.

Create a team project
Now you have a Visual Studio account. You can create a team project.
-
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 checkinOr, 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 [email protected]
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 checkinIf 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.