Let me start this post with an explanation.
The challenge I have is the following: I want to share code examples from Dynamics NAV in a structured & dynamic way. They are subject to change and improvement. I want people to able to download them, report bugs and if possible fix the issues themselves.
Visual Studio Team Services
About 18 months ago I blogged about the availabilty of Visual Studio Online, or VSO.
This has since a few weeks been renamed to Visual Studio Team Services. Makes a lot of sense, since it is TFS in the cloud. Visual Studio Code is something else.
We are wondering off. I’ve been using VSTS for almost every project since it was released. It is easy to get started and allows you to combine strong agile project management tools with version control. Once you get the hang of it, it is very easy to use with Dynamics NAV.
Visual Studio Team Services is secure. When I do a customer project it allows me to assign who has access to the code and to the work items. Perfect for a project
In this specific case, I want the opposite. I want everyone to access my code, download and improve it. Hence I was thinking of GIT.
Back then I decided against GIT, exactly because of the reason it was open source and Microsoft brought us Visual Studio Online.
Visual Studio & GIT
Since quite a while Visual Studio allows you to use GIT instead of TFVC. Hence I figured I should use that.
Git vs. GitHub
Now we are getting to the point of this blog. The explanation of Git vs. GitHub and what Visual Studio Team Services are using.
For almost all Dynamics NAV partners Git is new, so I expect it might be benefitial for our ecosystem to explain this.
Visual Studio Team Services & Git
If you don’t change its default behaviour and select Git as version management system your code does not end up on GitHub. This is (honestly) what I expected. But it does not work like that.
Visual Studio Team Services has its own Git server, which runs independantly from GitHub. It is hosted by Microsoft.
For me this meant I was back to square one, because I wanted to share my code on GitHub. I spent the better part of two hours figuring this out.
GitHub & Dynamics NAV
So how do I get my code from NAV on GitHub then? I’ve found two ways. One is a shortcut and one is more official.
Convert from TFVC to GitHub
GitHub allows you to import a project from TFS, including Visual Studio Team Services. I used this to convert two existing projects you can find on my GitHub account.
GitHub plugin for Visual Studio
If you like working with Visual Studio you can use the GitHub plugin. This is explained in this YouTube video.
This allows you to work with GitHub just like you work with TFS as explained in the videos by Soren Klemmensen. Well, not 100% but kind of similar.
I’ve added a new playlist to my YouTube channel where I plan to do more videos on how to get started with GitHub and Dynamics NAV
Hardcore Git Commands
Off course you can also do hardcore GIT commands, but I am a visual guy. I don’t like PowerShell and I don’t like the GIT Commandline tools. I want to have a GUI. Git Commands are out of scope.
Visual Studio Team Services & GitHub
So, I have my NAV code on GitHub, but now I lost the possibilities of my Agile Project Management tools. Question of the day: Can I combine both?
For what I have found out you can actually have a Visual Studio Team Services project connect to GitHub. However I have yet to start playing with it.
Here are some links:
Next blogs are about getting your code in GitHub. This is what I’ve done for the code examples from my books and workshops.
Depending on the amount of time I have and the requests I intend to keep experimenting with getting GitHub to work with Visual Studio Team Services.