← Dictionary
Tools·intermediate

Git

Save points for your code. Undo, branching, collaboration.

Git is the tool that takes snapshots of your project over time.

The basic loop:

  1. You make changes to files.
  2. You git add the ones you want to save.
  3. You git commit with a message describing what you did.
  4. Git stores that as a labeled snapshot you can return to forever.

If you mess up later, you can roll back. If you want to try something risky, you can branch off, experiment, merge if it works. If you're working with other people, you can combine your changes with theirs.

Git is one of the most valuable tools in software — and one of the more confusing at first. Treat the beginner commands as muscle memory. The theory clicks later.

Related