Git

Git is the system that records every change made to a piece of software, along with who made it and why, so any change can be undone.

Also known as version control source control commit history

Definition

Git keeps a record of every change ever made to a piece of software, along with who made it, when, and why. Each saved change is called a commit, and because nothing is thrown away, any commit can be undone. That is the whole idea, and it is why several people can work on one product at once without overwriting each other.

Because that history exists, a bad release stops being a disaster. Rather than restore last night's backup and lose today's orders, the team puts the code back to the last good commit, usually in under a minute. GitHub and GitLab are websites built on top of Git, so they hold the shared copy and add the conversation. One person proposes a change and another reads it before anything reaches a customer. So when a client asks Linkysoft who changed a price rule, the answer comes from that record, not somebody's memory.

What surprises people most is that Git does not really forget. If a password or a payment key is saved into the history once, deleting the line a day later does not remove it. The old version stays in the record, readable by anyone with a copy of the project. So the only honest fix is to change the password itself and then clean the history. It is one of the first things we look for in a security review, and we find it more often than anyone would like.

Two more things are worth knowing, and the first is that Git is not a backup. It keeps the history of the code, not your customers' orders or files, which need their own copy elsewhere. The second is that the value of that history sits in the notes people write beside each change. Six months later a note reading "fixed" tells nobody anything, while "stopped the invoice total rounding down on orders in two currencies" saves an afternoon.

Then there is the question worth asking early, while everyone is still on good terms: whose account holds the code? Businesses tend to find out at the worst moment, when a developer leaves and the history walks out with them. Every project Linkysoft runs sits in Git from day one, in an account the client owns, even work we take over half-finished. That is also how one history covers a web application and the mobile app built into the same system. A change to a price rule reaches both, and we can show the day it landed.

Questions about Git

Is Git the same thing as GitHub?
No. Git is the record-keeping system that runs on the computers doing the work. GitHub is a website that stores a shared copy of that record and adds reviews and discussion. GitLab and Bitbucket do the same job.
Can Git bring back a file we deleted?
Yes, as long as the file was saved into the history at least once. You can get back any version of it, see who removed it and read the note they left when they did.
Is Git a backup of my system?
No. It keeps the history of the code, not your data. Orders, uploaded files and the database need their own backup, on a schedule, stored somewhere separate. That is a different arrangement and it has to be checked.
What happens to our code if the developer leaves?
That depends entirely on whose account holds it. Ask now, while the relationship is good. The company should own the account, and at least one person inside the business should have full access to it.
Someone saved a password in the code. Is deleting it enough?
No. The old version stays in the history and anyone with a copy of the project can still read it. Change the password itself first, then clean the history. Doing it the other way round leaves the door open.

Still not sure how this applies to your project?

Tell us what you are building and we will answer in plain language.