If you are a developer collaborating with a team, you know the importance of source code versioning systems. Keeping track of revisions and additions to the project through team members becomes essential. While Microsoft Team Foundation Server remains the tool of choice across the Microsoft developer community, some might want to opt for a lightweight and low maintenance (or even free) version control system.
Git is one of the tools you might want to look for in such a scenario. Github is a popular service that offers free public Git repositories (popular for Open Source projects) and premium private Git repositories. So essentially you do not have to maintain a version control server in-house.
Let’s take a quick look at how to get a Github account setup and ready to use for projects on your Windows 10/8/7 machine. To begin with, sign-in to github.com or create a new account if you don’t already have one. Once done, you’ll see the welcome page shown below.
Go to “Set Up Git”, and download the Github installer for Windows. This online setup also includes the Git shell, so you do not have to install it separately.
Click “Install” on the Application Install prompt, to start the online installer. The online installer downloads about 38MB of files.
Once the download and installation is complete, sign-in on the client, with your Github account.
Configure your local Git installation with your user details – (full name and email) to be used during making commits to your repositories.
Once that’s done, you are all set to create and add repositories to your brand new Git client. To create a new repository click on “add”.
Enter a name and description for the new repo, and select a file location for the repo to be created. Check the “Push to Github” option as we want to store our repository online as well.
An empty repository is now created. You’ll see a prompt on the left portion of the screen, mentioning that there is no ‘Read me’ file included. So let’s add a readme to our Git repo. This is the file that gets displayed on the home screen of your repository on Github; like the one, you’ll see here.
Open Notepad, and enter the following text.
Save this file as “Readme.md” in the Git repo present in the previously selected location.
Open the repository on the Github client. The client will reflect the changes, i.e., New files added to the repo. At times you might have to close and reopen the repo for the changes to reflect. Though the client automatically adds changes to the repo, you have to commit the changes with a proper description to the repository as shown in the image below.
Once you have added the commit, the repository will automatically start to sync. To view the repository on Github, click on Tools > View on Github.
Now that you have your Github repository online, you can freely modify and add files to your repo. Place commits and lets the Github client sync it for you. Moreover, you can also start pulling repositories from Github.
Git is widely used from a command-line interface (known as ‘Git Bash’ on Unix), but this might seem a bit too intimidating for the first time user. The Github client on Windows makes this easy for you. That too with a Modern UI, making it feel native on Windows 8. Github lets you host unlimited public repositories for free, while repositories are available at a premium price. BitBucket (bitbucket.org) is another service that lets your host free private repositories as well and can be linked to the same Github client on Windows.
Read next: How to setup Node.js development environment on Windows 10 system.
Guest Post By Omkar Khair