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:
- You make changes to files.
- You
git addthe ones you want to save. - You
git commitwith a message describing what you did. - 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.