The Team Foundation Server (TFS) is the same as GitHub in a sense but is comparatively less useful. It is a product of Microsoft for source code management. It also supports Visual Studio (even GitHub can be connected to Visual Studio).
I will not go in details on how to set up TFS on a server; instead, I will provide a link that you can easily Google, https://msdn.microsoft.com/en-us/library/hh561426(v=vs.120).aspx.
And the link for the Setup Team Foundation Server on Visual Studio is https://www.visualstudio.com/en-us/docs/setup-admin/tfs/install/get-started.
These are straight forward steps, similar to those involved in installing any other Microsoft product. Now, I will assume that you have successfully set up the TFS in your Visual Studio system. You can follow the following steps for the setup of TFS for Dynamics NAV:
The first step after you have set up TFS is to create a folder structure, a bit similar to what we did for GitHub...