git init

Learning Git and GitHub
Saturday, March 21st, 2015

back to blog index

This week we dove into “git.” Git is a distributed revision control system. Revision control is the management of changes to documents. In distributed revision control, many users can work on a given project without sharing a common network. Instead of a centralized system in the client-server approach, distributed revision control allows each user to have a copy of a project on their own system. The different copies are synchronized by exchanging changes peer-to-peer.

Revision control is also known as version control. Version control is a beneficial tool for many reasons. As the name implies, this system allows users to control the storage of different versions of a file or project in a safe, organized manner. Instead of trying to manually track changes in updated versions of files - which can be incomplete, poorly documented, and costly to store - "snapshots" of changes are available in one central place. Properly-managed and well-documented changes allow for the restoration of previous versions (when necessary), expanded backup capabilities (as many individual copies are distributed), and better analysis of the history of a project (thanks to descriptions that accompany the changes).

Version control also allows for better collaboration. Instead of working with a common shared folder, when only one user should be making changes at a time, any user can work on any file at any time. Changes are later merged into a common version. With version control, engineers can truly collaborate, working on any file whenever necessary, and for as long as needed. The entire project can be viewed at any time, and when it is improved upon, changes can be added.

In git’s method of version control, entire snapshots of a project are saved to a repository, which is an on-disk data structure containing metadata for a set of files and directories. The snapshots are known as commits, which can be merged with other versions of the project. With GitHub, a web-based repository hosting service, this is made even easier. GitHub contains its own version of a project’s repository, which acts as a central repository, allowing engineers to pull and push changes. It allows for forks of projects, which then become new central repositories. When changes are made to a fork, pull requests allow them to be merged with the main project. Thus, GitHub allows for even better collaboration, allowing users to build projects together, and save the history of the project along the way.

Our brief exploration into the concepts of git and GitHub has shown us their truly revolutionary nature. They allow users to track changes and collaborate better than they ever have before, all without a reliance on a central server. As we move forward in our learning DBC, our understanding git will be instrumental.

back to blog index