Hands-on: GitHub for Windows takes the pain out of using git

Get up and running with git without once having to use the command line.

GitHub uses the git distributed version control system originally created by Linus Torvalds to help manage Linux's development as its backbone. It provides project hosting, bug tracking, and more, all wrapped up in a powerful Web interface. GitHub's most important feature is perhaps its trivial ability to fork projects. It takes just a few clicks to create your own version of a project to hack on and develop. Thanks to these features, GitHub has become the go-to place for collaborative open source software development. It's the home of projects such as Ruby on Rails and Node.js.

However, one developer community has found GitHub harder to use than others. Though the situation has improved, git and Windows are not the best of friends. After all, git was developed for Linux; Windows isn't anything like Linux. But that's where GitHub's new application, GitHub for Windows, comes in. GitHub for Windows provides a simple way to install and start using git on Windows, along with neat integration with GitHub's hosting and forking infrastructure.

The application, released on Monday, is an attractive, Metro-styled program. In addition to the GitHub for Windows application itself, it includes a self-contained version of git, the bash command-line shell, and the posh-git extension for PowerShell. You don't even have to manage any of these individual pieces yourself. The application uses a ClickOnce installer so it keeps all the bits and pieces up-to-date automatically.

The traditional issue with using git on Windows has been that it's all rather command-line oriented. Many of us swear by the command-line; just as many of us swear at it.

All version control systems have a notion of a repository, a place where source code and all its history is stored. Distributed version control systems like git extend this idea to have a lot of repositories. Each developer working on a project will have his or her own private repository, and typically each project will also have a "master" repository to provide a central place for publishing the project. It's these centralized repositories that are hosted on GitHub. (Though git doesn't have to be used this way; every person using it on a project could put in place the infrastructure to serve up access to their local repository if they really wanted. It's just much easier to not do so).

Enlarge/ The dashboard shows all your repositories, both local and remote.

Usually, performing the basic operations for managing a repository—committing changes, copying changes from a local repository to a remote one ("pushing"), or from a remote one to a local one ("pulling")—are done at the command line. While delving into git's more esoteric corners will demand the use of the command-line client, a friendly GUI for bread-and-butter tasks is a welcome thing. Setting up GitHub also involves a few additional chores, such as configuration of ssh keys.

GitHub for Windows addresses both areas. It handles the GitHub settings and configuration automatically, and it provides a basic graphical front-end to handle the main version control tasks. The GUI can create new repositories, commit changes made to a local repository, and synchronize changes between a local and remote repository.

Enlarge/ GitHub for Windows shows you all the changes you've made to your local source that aren't committed to your local repository.

Enlarge/ Add an informative commit message when you make your commit, or else your fellow developers will hate you.

Enlarge/ Once committed locally, the changes can be synced to the remote repository just by hitting the sync button. Behind the scenes, this will do the necessary git push and pull operations.

For experienced git users, the terminology used in GitHub for Windows might be a little surprising. In GitHub for Windows, the "push" and "pull" operations are combined into a singular "synchronize" operation that will perform the appropriate pushes and pulls to make the contents of the local and remote repositories match.

One of git's biggest strengths is that it makes the creation of branches nearly instantaneous, and cheap in terms of disk space. This encourages a policy of regular branching. Each time you want to make a series of changes in order to, for instance, add a new feature, you can create a branch for that feature. You can then do all the work on the branch, a process that may take weeks or months if the feature is large, and finally merge that branch back into the "master" branch.

Enlarge/ It's not the most feature-rich interface imaginable, but it gets the job done in the common case. git's merging capabilities are pretty clever.

This would typically require the use of the command line. But again, GitHub for Windows provides a simple user interface for handling the common scenarios in a GUI.

There's also integration between GitHub's website and GitHub for Windows: projects on GitHub now have a "Clone in Windows" button that'll create forks of projects and clone their repositories with just a couple of clicks.

GitHub for Windows is not GitHub's first GUI. The company released GitHub for Maclast year, a decision that provoked a flurry of demand for an equivalent Windows application. Windows developers want to use git (even Microsoft has added git support to its CodePlex hosting service), and GitHub's hosting is one of git's big draws, making a Windows version highly desirable.

The result is a polished, if simple, application that has something to offer both experienced git users and newcomers. For the old hands, the automatically updated git installation is a great convenience; for newbies, the GUI makes getting started with GitHub remarkably painless. It doesn't do everything that a git GUI should do—visualization of branches, commits, and merges is a must-have for more complex projects—but for those wanting to make their first tentative forays into the world of GitHub, it's a great place to start.