What is Git?

Knowledge Videos

Short animated explainers, organised by subject.

What is Git?

Git remembers every saved version of a folder. Repository, commit, and the four first commands: git status, add, commit and log.

Try it

Transcript

When you work on a project, you want to be able to go back to an earlier version. Git is a tool that remembers every saved version of your folder. The folder it watches is called a repository.

Each saved version is called a commit. A commit is a snapshot of your files, with a short message that says what you changed. It is like a checkpoint in a game.

To make a commit you use three commands. Git status shows what changed. Git add chooses the changes to save. Git commit saves them, with a message.

Git log lists all the commits, newest first. If something breaks, you can go back to a commit that worked. Git never saves by itself: you decide when to make a checkpoint.

Remember: Git remembers versions. A repository is the folder it watches, a commit is one saved version, and git status, add, commit and log are the commands to start.

More in this series