An Introduction to GitHub
NoteIn this training, Content Strategy and Design Specialist for GSA’s Technology Transformation Services (TTS), Malaika Carpenter, breaks down how to use GitHub into easy, practical steps and demonstrates ways to use this tool to create, manage and publish website content.
What is GitHub?
GitHub is a web-based interface that uses Git, the open source version control software that lets multiple people make separate changes to web pages at the same time. As Carpenter notes, because it allows for real-time collaboration, GitHub encourages teams to work together to build and edit their site content.
How Can GitHub Help My Team and Me?
GitHub allows multiple developers to work on a single project at the same time, reduces the risk of duplicative or conflicting work, and can help decrease production time. With GitHub, developers can build code, track changes, and innovate solutions to problems that might arise during the site development process simultaneously. Non-developers can also use it to create, edit, and update website content, which Carpenter demonstrates in her tutorial.
How Do I Speak GitHub?
During the video, Carpenter defines some of the common terms teams will need to understand when using GitHub. They are:
- Repository (repo) — a folder in which all files and their version histories are stored.
- Branch — a workspace in which you can make changes that won’t affect the live site.
- Markdown (.md) — a way to write in Github that converts plain text to GitHub code. Sites such as Atom and Sublime Text are examples of free resources for developers using Markdown.
- Commit Changes — a saved record of a change made to a file within the repo.
- Pull Request (PR) — the way to ask for changes made to a branch to be merged into another branch that also allows for multiple users to see, discuss and review work being done.
- Merge — after a pull request is approved, the commit will be pulled in (or merged) from one branch to another and then, deployed on the live site
- Issues — how work is tracked when using git. Issues allow users to report new tasks and content fixes, as well as allows users to track progress on a project board from beginning to end of a specific project.
- Federalist — a platform that securely deploys a website from a GitHub repository in minutes and lets users preview proposed and published changes.
Carpenter notes that becoming fluent in GitHub terminology might seem intimidating at first, but the more team members engage with the platform, the easier it is to understand the ins and outs of GitHub.
How Do I Use GitHub?
In her live demonstration, Carpenter shows how files are changed and merged in GitHub. This can be done by any member on the team, developers and non-developers, that has access to a GitHub repository. The following is a step-by-step method in which GitHub users can develop their websites:
- Step 1 — Team members will open an issue via a project board.
- Step 2 — Team members will create a new branch from the most recent version of the main branch in the repository where the entire team works to avoid conflicts.
- Step 3 — Team members will add commits (edits/ changes) to their respective branches.
- Step 4 — Team members will open a pull request in which users can assign other team members to review content changes and internally discuss the details of the commits.
- Step 5 — After waiting for the Federalist build to complete, team members can preview the change on a test version of the website and request reviewers to approve or comment on the change. Once the reviewers approve the pull request, the commits merge into the main branch and are published on the live site.
What Else Do I Need to Know About GitHub?
Carpenter provides some helpful hints when using GitHub. For example, when starting a project using issues and project boards, she suggests GitHub users write their content on external word processors or via Google Docs, and then, save these files to their respective project boards. These steps allow developers and content creators to have a master copy of the file(s), thus helping them track changes over the course of a project.
In addition, Carpenter suggests developers download GitHub Desktop. GitHub Desktop allows users to do everything that could be done on GitHub’s web interface, but locally on a user’s machine.
GitHub is built to be a collaborative interface. By allowing multiple users to work on the same project simultaneously and requiring cross-team approval for pull requests, GitHub not only allows for, but encourages collaboration within design teams. Carpenter states that this type of collaboration can help produce a higher level of quality control.
- Intro to GitHub | TTS Handbook - a guide on how to use GitHub from understanding basic level terminology to understanding more complicated concepts.
- Simple Guide to GitHub for Non-Developers - a resource that explains the basics of GitHub language.
- Getting Started with GitHub Desktop - a guide to help GitHub Desktop users understand how to work from a local computer.
- Markdown Cheat Sheet - is a tool to help users transcribe plain text language into GitHub code.