How it works

GitHub: A Swiss Army knife for open government

Swiss army knife.

Every morning, the first waking task most humans perform is checking email or the latest updates on their social media accounts. For developers, that initial daily fix is GitHub, the social coding platform that has captured the hearts of millions of hackers and tech enthusiasts around the world.

The social network for professional developers and everyday hackers aims to bring distributed, open collaborations to the world, one repository at a time, and it's beginning to find its way into government. Founded in 2008 by P.J. Hyett, Chris Wanstrath and Tom Preston-Werner, the San Francisco-based company claims 6 million people have created more than 13 million repositories to date on its platform.

With an ever-growing population of users, an aggressive expansion of features and more than $100 million in venture capital funding, GitHub is going beyond just a tool for the tech elite and is poised to be Silicon Valley's next big public offering.

The term "GitHub" is a riff on the open-source distributed version control system Git developed in 2005 by Linux kernel creator Linus Torvalds. Other VCS platforms include Subversion (created by CollabNet and now part of Apache Software Foundation's ecosystem) and Perforce. Years before Git, SourceForge was the first centralized platform that allowed developers to share code and manage software development projects.

Although GitHub hosts millions of open-source projects, the company retains all rights to the platform code, which is built using Ruby and Erlang. Open-source alternatives include Git, GitLab and Gitorious, each of which offers the ability to download the source code and use it freely on internal development environments, similar to GitHub Enterprise but without the associated licensing fees.

The history

In many ways, the rise of open source in government in recent years is a direct correlation with GitHub's growth and its attractiveness to influential early-adopter agencies, including NASA, the Federal Communications Commission and the Consumer Financial Protection Bureau (CFPB). Today, government and civic hackers' open-source accomplishments are synonymous with shiny new GitHub repositories.

But GitHub isn't government's first foray into version control and code repositories. The Defense Department launched Forge.mil, a centralized platform available only to DOD collaborators, in 2009. From a technical perspective, rather than being a unified code base, Forge.mil is an integration of the content management system Drupal and the proprietary version control system CollabNet.

GitHub's big government breakthrough came in May 2012 at TechCrunch Disrupt, when U.S. CIO Steven VanRoekel, alongside Chief Technology Officer Todd Park, introduced the Obama administration's Digital Government Strategy, which calls for agencies to "participate in open-source communities."

At the conference, VanRoekel announced that the White House would begin publishing to GitHub, and officials subsequently released the complete code base of the "We the People" online petition platform. The larger wave of government GitHub adoption came with the implementation of the digital strategy, and since then, federal agencies have been on a social coding spree.

Today, more than 300 government agencies are using the platform for public and private development. Cities (Chicago, Philadelphia, San Francisco), states (New York, Washington, Utah) and countries (United Kingdom, Australia) are sharing code and paving a new road to civic collaboration.

Some agency examples

In addition to a rapidly growing code collection, the General Services Administration's new IT development shop has created a "/Developer program" to "provide comprehensive support for any federal agency engaged in the production or use of APIs."

The Consumer Financial Protection Bureau has built a full-blown website on GitHub to showcase the software and design work its employees are doing.

Most of the White House's repos relate to Drupal-driven websites, but the Obama administration has also shared its iOS and Android apps, which together have been forked nearly 400 times.

Civic-focused organizations -- such as the OpenGov Foundation, the Sunlight Foundation and the Open Knowledge Foundation -- are also actively involved with original projects on GitHub. Those projects include the OpenGov Foundation's Madison document-editing tool touted by the likes of Rep. Darrell Issa (R-Calif.) and the Open Knowledge Foundation's CKAN, which powers hundreds of government data platforms around the world.

According to GovCode, an aggregator of public government open-source projects hosted on GitHub, there have been hundreds of individual contributors and nearly 90,000 code commits, which involve making a set of tentative changes permanent.

The nitty-gritty

Getting started on GitHub is similar to the process for other social networking platforms. Users create individual accounts and can set up "organizations" for agencies or cities. They can then create repositories (or repos) to collaborate on projects through an individual or organizational account. Other developers or organizations can download repo code for reuse or repurpose it in their own repositories (called forking), and make it available to others to do the same.

Collaborative aspects of GitHub include pull requests that allow developers to submit and accept updates to repos that build on and grow an open-source project. There are wikis, gists (code snippet sharing) and issue tracking for bugs, feature requests, or general questions and answers.

GitHub provides free code hosting for all public repos. Upgrade offerings include personal and organizational plans based on the number of private repos. For organizations that want a self-hosted GitHub development environment, GitHub Enterprise, used by the likes of CFPB, allows for self-hosted, private repos behind a firewall.

GitHub's core user interface can be unwelcoming or even intimidating to the nondeveloper, but GitHub's Pages package offers Web-hosting features that include domain mapping and lightweight content management tools such as static site generator Jekyll and text editor Atom.

GitHub Glossary

Fork: How other users copy a repo and repurpose it.

Gist: A simple way to share code snippets without committing to a full repo.

Git: An open-source, distributed version control system that allows anyone, anywhere to collaborate on code. GitHub uses Git version control.

Issues: A way for people to submit feature requests or bugs that others can then comment on and help resolve.

Pull request: How users contribute code to a repo. If the owner accepts it, the code is "merged" into the main project.

Repo: Short for "repository"; this is where an open-source project lives.

Notable government projects that use Pages are the White House's Project Open Data, 18F's /Developer Program, CFPB's Open Tech website and New York's Open Data Handbook. Indeed, Wired recently commented that the White House's open-data GitHub efforts "could help fix government."

Although GitHub, in its nascency, is largely about code, innovative agencies are expanding its use beyond 1s and 0s and capitalizing on its collaboration features for public engagement on procurement requests for proposals, legal code, website hosting and even solicitation of general suggestions.

For example, in its /feedback repo, the National Archives and Records Administration asks: "Do you have feedback, ideas or questions for the U.S. National Archives? Use this repository's Issue Tracker to join the discussion." Canada published its front-end common look-and-feel framework, the Web Experience Toolkit, to GitHub. And late last year, San Francisco posted the city's legal code to its GitHub account "in technologist-friendly formats that can power new applications that enhance understanding, improve access and lead to new insights around the laws."

In addition, Philadelphia used GitHub to publish its open-government plan, API standards (forked from the White House's standards) and even a request for proposals for a mobile application. In a retrospective post on his personal blog, former Philadelphia Chief Data Officer Mark Headd said, "By the end of the submission process, we had received nine high-quality responses from local vendors -- a number that far outstrips the number of responses received for similar [miscellaneous purchase order] projects and three times the number of responses required."

The future

GitHub's true measure of civic success will be when government projects are regularly repurposed by others, and there are early indications that the future of government code will be forked. New Zealand made history by downloading the United Kingdom's front-end templates for the beta version of its new website. To date, the White House Web API standards have been forked 111 times, and Mexico recently forked Project Open Data.

Perusing USAxGITHUB, an up-to-the-minute feed of government GitHub activity created by former White House Presidential Innovation Fellows Adam Becker and Ben Balter (the latter of whom now serves as GitHub's government evangelist), one sees the future of government development: a transparent look into every public issue with the ability to jump in and collaborate at will. You could literally watch government technology unfold in real time.

Fundamentally, GitHub is a platform where people can share and repurpose ideas and information. In the not-too-distant future, it could be your code repository, collaboration platform, content management system and Web host all neatly wrapped into one website. As GitHub continues to expand its offerings and build a business beyond just sharing code, agencies should be watching. New ways of collaborating with the public are almost certain to emerge.

2014 Rising Star Awards

Help us find the next generation of leaders in federal IT.

Reader comments

Thu, Jul 10, 2014 Jon Jesse Boston, MA

The trends of open source adoption & contribution by the government actually parallels what we are seeing in the commercial enterprise. Both government and commercial enterprises are making strategic decisions to contribute assets to the open source community. In government's case, this provides transparency to its citizen stakeholders. In the case of the commercial enterprise, contribution drive communities or value chain. GitHub is the platform for open source contribution and collaboration in both cases. As we see increased contribution to open source by both government and the enterprise, it is important to remember that the vast majority of software and data assets that these entities develop and utilize to create value are proprietary (private) IP. The way governments and government contractors manage the development of private assets stands in stark contrast to open source use cases described in this article. Where in an open source context sharing and collaboration and key drivers, in private software asset development, security, operational efficiency, governance, and compliance are the priority. Adoption of Git based solutions for development of proprietary software assets is also occurring. Just as GitHub provides strength in contribution/collaboration, there are commercial Git based configuration management solutions that focus on providing the security, process control, and integration capabilities necessary to meet the compliance and governance requirements of government, government contractors, and the private enterprise.

Mon, Jul 7, 2014 Frank McNally DC

Github has enabled everyone to contribute to an open coding and development ecosystem. Something so challenging could not have evolved so quickly without the power of a willing, intrinsically motivated community. We need the same platform for other complex tasks within government, like the acquisition system. When strategies are proven successful, they should be submitted to a github-like platform (or maybe it should exist on github?) so others can fork them for their specific environment. Contributing forked acquisition strategies & other contractual processes will do more for evolving our acquisition of IT than legislative & oversight-led reforms, in my opinion.

Please post your comments here. Comments are moderated, so they may not appear immediately after submitting. We will not post comments that we consider abusive or off-topic.

Please type the letters/numbers you see above