Connecting a Git Repo to a New TFS Repo
I was testing with VisualStudioOnline, soooo….
2a. I had to enable basic auth for my Visual Studio Online Account:
To work with Visual Studio online from the Git Command prompt, you must Enable basic authentication for your Visual Studio Online account.
This forces you to enter your username/password EVERY SINGLE TIME you push or pull using git-tf.
You can set it in your global config like this:
The –global switch prevents it from being stored in the project’s .gitconfig, but be aware that this will add it, in plain text, to your global config file (which lives in C:\Users\YourId\.gitconfig).
2b – Take 1: Configuring GIT-TFS:
I originally thought “git tfs init” was intended to create a new TFS repo.
I could not find a way to create a new TFS repo & push an existing git repo up to it, solely using the git-tfs bridge.
2b – Take 2: Configuring GIT-TF:
> git tf configure https://coridrew.visualstudio.com/DefaultCollection/ $/libgit2sharp/Main –deep
What did that do?
It just added this to .git/config:
2b – Note: Adding the /Main folder to the path was necessary (although you could name it anything you want) because when TFS created the project folder, it was not empty:
This will also be mentioned in the troubleshooting section of my next post in this series about pushing to TFS.