Why use Visual Studio Team Services?
Microsoft’s Azure backed (and thus hosted) source control system Visual Studio Team Services really is a great toolset to work with. As they have made it as easy as they have to work with; I find it extremely difficult to argue why you would want to host your own source control system anymore?
I agree that back in the day that was how you did it; but honestly few developers get paid for managing a source control system per se. They are paid to deliver the product the source control system holds, which is the software product they are building. If you are dealing with defence related software one might argue that due to IP rights and the nature of the product; it might make sense but for the rest of us mere mortals, it is just an unnecessary hassle to manage this piece of infrastructure. Therefore – it is with the greatest conviction I’m proposing and using myself the hosted source control system in Azure both in a private setting as well as a business related setting.
GIT on TFS?
Github has become extremely popular the recent years. Initially I found it difficult to understand and appreciate that popularity as I came with 10 years of experience with the original Team Foundation Server myself; but is it not always like that when you do not understand something foreign to you? Having gotten my head around this source control system known as GIT I with a full heart honestly can understand and appreciate the nature of this system.
Using VSTS (GIT) on Windows and Mac at the same time?
As I’m not only doing Windows development these days, I have a need for hosting my source code somewhere common. I do not want to setup two different systems just because I happen to be developing in two worlds (.NET and Apple). After all source code is ultimately just a set of text-files (strictly speaking).From a Windows machine (i.e. Visual Studio 2013/2015) it’s a walk in the park to authenticate with VSTS as this to no surprise supports Microsoft accounts natively.
Unfortunately, this is not the case when attempting to authenticate from Apple’s XCode IDE. They do not support the usage of ‘firstname.lastname@example.org’ for some bizarre reason. You need to generate a person token that ‘imitate’ your username. How you do this is the topic of the below paragraph and I hope it can serve you as a guide so you do not need to figure this out yourself the hard way as I did.
Setting up GIT/VSTS access from Xcode
- First you need to create a personal token for your username to work as stand-in for you in Xcode:
- Login to the website of your source control system (<name>.visualstudio.net)
- When in the website – navigate to the section called My Profile –> Security
- Press Add to crete a new token
- You are done on the server side now. Open XCode on the Mac
- Open the Source Control menu item and press CheckOut
- When it prompts you for credentials, enter the token instead of your normal username (microsoft account)
- Enter your password as you are used to and Next
- You are done and can now use Git from X-Code as if you were talking with Github or something else speaking GIT.
That is actually all there is to it. You will be able to find your source code and branches in VSTS online immediately after a push.