Version control

Code changes over time. Version control keeps a historical record of all of those changes, who worked on those changes, and why.

The problem

Remember when you did this for an essay in school?

  • essay.txt
  • essay-1.txt
  • essay-1-edit.txt
  • essay-2-final.txt
  • essay-2-actual-final.txt
  • essay-2-edited-final.txt
  • essay-3-final.txt
  • essay-done.txt
  • essay-final.txt
  • essay-final-done.txt

Well, that's a zoo. No way we want to do that with our codebase.

Code is complex. It's hard to keep track of. It's hard to read. It's hard to write. It's hard to understand. And that's all if it's just sitting still.

In reality, a company is going to have many people working for it and the code is going to constantly be changing. It's essential to the health of the business and its products that a record is kept of how the code changes, who did it, and why.

The solution

Version control solves that.

When you want to make changes to the code, you probably want to keep your old version around - just in case you made a mistake. This lets you go back to the previous version so that your broken code can be recalled and you can bring your app back to a previous version that still worked.

There are many other conveniences that come along with version control. But this is a big one that tends to be important.