GitHub-101

GitHub 101

This project is maintained by audreywatters

What is GitHub?

GitHub is a Web-based code repository service, based on Git, a distributed revision control system. Git was first developed by Linux creator Linus Torvalds (because, yup, "git"), as a way to manage the development of the open source project.

There are several key features to Git that make it a useful tool for collaborative projects, and although it’s most often used for managing coding, it can be used for managing other files – from Word documents to HTML pages. Unlike other version control software, Git is distributed – that means that you don’t make changes directly to a centralized repository. Instead, you work on your own local copy of the entire repo. When you’re ready (and if you choose), you can submit your changes back to the original repo.

GitHub offers Git's functionality, with additional features like bug reports and "social" interactions. (Whee. "Social coding.")

Git is a command line tool. You can use GitHub via the command line too, but it has a Web-based graphical interface. There are also Windows and Mac apps you can download.

While Git is an open source tool, GitHub is a for-profit hosting platform. While it's seen steady adoption around the tech industry (and even in government), the company has been accused of being a hostile work environment for women. GitHub has raised $350 million in venture capital from Sequoia Capital, Andreessen Horowitz, and others.

The Vocabulary (and Functionality) of GitHub

There are three major terms you need to know to understand GitHub: 1) fork, 2) pull request, 3) merge.

To “fork” a repository means that you copy it from one user’s account to your own. This makes it possible for you to take a project that you aren’t explicitly a member of and don’t have “write” access to, and lets you make changes on your version. These changes only exist on your version; the original is not modified. If you want these changes to be incorporated back into the original repo, you can send a notification called a “pull request” back to its owner. That person can review the changes you’ve made and decide whether or not to incorporate the changes in your repo into the original one – that’s a “merge.”

Using GitHub Pages

Each repository can generate a website automatically, using GitHub Pages. The files are hosted by GitHub and are kept inside the repository (the files are not part of the “master” branch, but one labeled “gh-pages.”) You can map the site to a custom domain. Otherwise the URL for a project’s GitHub Page will be username.github.io/projectname.

While GitHub Pages do support HTML, they are powered by Jekyll, an open source program that creates static Web pages ready to be served by Apache.

This is how I power my websites. I love it because, unlike WordPress, I don't have to worry about managing a database. It's all a matter of editing Jekyll, Markdown, or HTML. My sites use the Mediator theme. I often use Prose.io editor to create and update files when online; for offline work, I use the Sublime Text editor (it's not free, but I'm happy to pay for software, particularly when it doesn't suck).

Let's Practice!

Fork this repository. Make changes. Fix typos. Add resources to this brach. Add a new file. Tweak the layout. Submit a pull request.

Additional Resources

"GitHub Guides" by GitHub

"Getting Started with GitHub" by Kris Shaffer

"Learning GitHub Without One Line of Code" by Melody Kramer

"Resources for Learning Git and GitHub" by Konrad Lawson

"Why and How I Put Syllabi on GitHub" by Karl Stolley

"Reclaim Your Domain (with Jekyll)," Parts 1, 2, 3, 4 by Audrey Watters

"Using GitHub to Power a Web Project: How and Why" by Audrey Watters

"How (and Why) to Generate a Static Website Using Jekyll," Part 1, Part 2, and Part 3 by Alex Gil