
close
close
In today’s Ask the Admin, I’ll show you how to get started with GitHub for Windows – the open source distributed version control system.
advertisment
As a system administrator, you may think that you don’t have much need for Git. After all, isn’t that a developer thing? But with the industry moving ever faster towards the cloud and DevOps, sysadmins need to understand technologies such as Puppet, Chef, PowerShell DSC, and JSON.
An integrated scripting environment in principle is all you need to work with the code required to use the technologies I mentioned above, or even Notepad might do. But that is until you start collaborating with colleagues on a regular basis. Keeping track of who has made what changes to code can become a headache, and is reflected in the quality of code you produce and the time it takes to complete projects, so some kind of versioning control becomes as important as for any other file type.
That’s where Git and GitHub step in, although by no means the only version control system available, with Microsoft’s own Team Foundation Version Control (TFVC) that’s built in to Visual Studio Online coming to mind, GitHub is one of the most widely adopted.
Git keeps track of the changes you make to local copies of repositories, and then allows you to sync changes back to the server. If a merge conflict occurs, when two or more people have modified the same line of code, Git flags the conflicts so that you can resolve them manually. For more information on Git, GitHub and version control, see What is GitHub? and Create a GitHub Repository on the Petri IT Knowledgebase.
advertisment
Note that I have already a GitHub account, have created a repository using the GitHub website, and initialized it, which allows me to clone it in GitHub for Windows.
Accounts in GitHub for Windows (Image Credit: Russell Smith)
You can add or remove accounts after the initial installation by following the instructions below.
Now that GitHub for Windows is installed and you have logged in, let’s clone a repository. There are two ways to do this.
Cloning a repository in GitHub for Windows (Image Credit: Russell Smith)
To modify files in your repository, you don’t use GitHub for Windows. File Explorer and your favorite editors are still used for that task. Although, you can use GitHub for Windows to open the local clone of your repository by right-clicking a repo in the list on the left of GitHub for Windows and selecting Open in Explorer from the menu.
advertisment
While you are editing or adding files to your repo externally, GitHub for Windows keeps track of the changes that are being made to files and folders in each repo, and then syncs them back to the server copy of the repository once you’ve manually committed the changes.
Committing changes in GitHub for Windows (Image Credit: Russell Smith)
Before you can add a file to a repository, you must commit it. GitHub for Windows shows the files that have been changed or added, and you can either individually or collectively commit them.
That covers the basics. In my next article on GitHub for Windows, I’ll show you how to add branches to your repo, create pull requests and deal with merge conflicts.
More from Russell Smith
advertisment
Petri Newsletters
Whether it’s Security or Cloud Computing, we have the know-how for you. Sign up for our newsletters here.
advertisment
More in Cloud Computing
Build 2022: Microsoft Introduces New Dev Box Cloud PC Service for Developers
May 24, 2022 | Rabia Noureen
Use Azure ExpressRoute Private Peering & Azure Virtual WAN to Connect Privately to Microsoft 365
Apr 21, 2022 | Flo Fox
Microsoft to Make Changes to Cloud Licensing Restrictions after Customer Complaints
Apr 18, 2022 | Rabia Noureen
Most popular on petri
Log in to save content to your profile.
Article saved!
Access saved content from your profile page. View Saved
Join The Conversation
Create a free account today to participate in forum conversations, comment on posts and more.
Copyright ©2019 BWW Media Group