Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.
Jon Craggs edited this page Jun 17, 2019 · 9 revisions

Git

Git is a version control tool for tracking changes in source code during software development. As projects generally have multiple developers working in parallel a version control system like Git is needed to ensure there are no code conflicts between the developers. Git also allows roll-backs to previous versions of software as well as allowing staging of releases of software in a development cycle.

For information on using git visit the Git How-to page.

Github

Git is the tool for version control, GitHub is a hosting service for git repositories.

Github provides access control and several collaboration features such as wikis, task management, and bug tracking and feature requests for every project.

Github allows you to:

  • Share your repositories with others.
  • Access other user's repositories.
  • Store remote copies of your repositories (github servers) as backup of your local copies.

Branches

Branching, is the duplication of an object (e.g. source code) under version control, so that modifications can occur in parallel along multiple branches. In Git the main development branch is called the master.

A branch not intended to be merged (e.g. because it attempts to serve a different purpose) is called a fork.

Why are branches important?

If you are creating a new feature for your project, there's a reasonable chance that adding it could break your working code. This would be very bad for active users of your project. It's better to start with a prototype, which you would want to design roughly in a different branch and see how it works, before you decide whether to add the feature to the repository's master for others to use.

Another, probably more important, reason is Git was made for collaboration. If everyone starts programming on top of your repository's master branch, it will cause a lot of confusion. Everyone has different knowledge and experience (in the programming language and/or the project); some people may write faulty/buggy code or simply the kind of code/feature you may not want in your project. Using branches allows you to verify contributions and select which to add to the project.

Git hooks

Git hooks are scripts that Git executes before or after events such as: commit, push, and receive.

Within this project we currently have a pre-commit hook which set to run make lint on the project directory (see the Make File page for more info).

Clone this wiki locally