You, humans, write code to tell us, computers, what to do. But, writing code is not a straightforward task.
Coding requires a lot of trial and error.
Many times, you'll find yourself moving forward with a program thinking you're going in the right direction only to realize hours later that it wasn't such a good idea after all. 🙈
That's when you wish you could go back on time! Well, humans have an easy way to do just that —they use repositories.
In this episode of the ABC of Computers series you'll learn:
- What repositories are
- How they keep track of your code's history
- The biggest collection of repositories
Let's begin with some computer basics for kids!
What is a repository?
A repository is like a bucket placed in a corner inside your computer. You can store there your code in any given time and it keeps track of your changes.
Humans communicate often with their repositories.
You can send or push code to them and you can also ask the repository to send you some code back. In this case, you'd say, "I just pulled some code from the repository".
Every time that you send a piece of code to the repository is called a commit.
Local and remote repositories
Now imagine that you're building a program together with your friend. What if you could both share a repository to save everybody's changes?
You can store your repository in a remote computer or server. You will then communicate with that server in the same way: pushing and pulling code.
Remember to create a separate branch for each of you. Like in a tree! This allows you both to make changes in your code without breaking your friend's.
From time to time, you'll be putting all your progress together. You'll then say, "let's merge our branches".
A brief history
As of January 2020, Github reports having over 40 million users and more than 100 million repositories.
Those, my Human, are Megas and Megas of lines of code!
Horray-bits! You just learned what a repository is, how humans work with them locally and remotely, and some of the biggest platforms to help you do that.
Let's now cross some words! ✏️
Remember, understanding computers is a SUPERPOWER. So, keep on learning!
Lots of megas from The Binary World, 👋
Zerus & Ona
PS. Complement your learning with what the motherboard is, what a bottleneck is and how to raise your children's interest for technology.