Back
GIT

By Sean Toru | last updated 28th December 2020


G

GIT

GIT is a tool that coders use to track the changes they make to their code, and to collaborate effectively with each other. It’s an open source tool, created by Linus Torvalds, who also oversaw the creation of the Linux operating system.

GIT is an incredibly effective, powerful and hugely popular tool. It runs from your command line, but there are lots of Mac/Windows apps that provide a graphical user interface to it, such as Tower and SourceTree.

GIT works by defining a repository (aka repo), which is essentially the set of script files, build scripts, documentation and other assets that can be thought of as the ‘source code’ of a website or app. Developers ‘commit’ their changes to this repo, making notes on each ‘commit’ as to what has been changed and why.

You can then have an ‘origin’ for this repository, which is a place where the GIT repo will be stored for all to access. Developers ‘push’ their commits to these shared origins, and ‘pull’ and ‘merge’ changes that others have made. The most popular platform to host GIT origins is Github.

You can then create what are known as ‘branches’, which can be thought of as different copies of the repo. So you might have a team of 10 developers all working on a GIT repo. There might be a ‘main’ branch which can be thought of as the live copy of the code. Some of the developers might be adding significant new features, in which case they would ‘branch off’ the main branch, and commit their changes there. That way any bug fixes to the live code could be made whilst this other work is being done without people stepping on each other’s toes. Then when the new functionality is complete its ‘branch’ is merged back into the main branch and deployed to the web server or app store.

There is much more to GIT than this simple definition outlines. It is a much loved foundational tool to pretty much all coding work being done around the world. Budding coders should get to grips with it ASAP.

Related Terms

Do you want to contribute to this page?