Introduction to GitHub

GitHub offers Git server as a service to track changes you make to your code, so you can always go back and view a history of changes you’ve made. In addition, there is a suite of project management and collaboration tools that help facilitate working that revolves around a codebase.

See information on NOAA GitHub Guidelines to learn about using GitHub as a NOAA Fisheries Affiliate.

GitHub can help you stay organized

Repositories are like directories for your code or project, but are under Version control. This helps you keep code changes in one place and tracks differences so you can go back to older versions as needed!

Repositories can be public, if you want others to see your code or to collaborate, or private, if you want to use Git and GitHub functionality without sharing your code.

GitHub also helps you stay organized through project managment tools like Projects.

GitHub helps you collaborate

GitHub helps you share code more readily. People can see your code and copy it directly to their computer by downloading a .zip file or by cloning your repository.

People can also fork your repository to have their own repository on GitHub that keeps up with changes to the your repo. On their fork, they can make changes, and then open a pull request to suggest changes to your codebase.

You can ‘add collaborators’ to a repository so multiple people can work on it at the same time.

GitHub Vocabulary

Repositories (or ‘repos’) contain all of your project’s files and each file’s revision history

Clone a repository to create a local copy on your computer and sync between two locations

Fork a repository to make a copy and freely experiment with changes without affecting the original project

Branches can be used to isolate development work without affecting other branches in the repository

Push commits made on your local branch to a remote repository

Pull / Pull request lets you tell others about changes you’ve pushed to a repository

Commit records changes to one or more files in your branch

GitHub Video Tutorial

This video tutorial provides an introduction to using Git and GitHub. Follow along with the corresponding tutorial here. This webinar is presented by Luke Thompson, an Associate Research Professor at the Northern Gulf Institute at Mississippi State University & Atlantic Oceanographic and Meteorological Laboratory (AOML). The webinar was hosted by the NOAA Central Library.

More GitHub Resources