Now let’s talk about version control’s better half: code repository. You see, version control and repositories need each other to work. You can’t have one without the other. Let's dive in and find out why!
What is a code repository?
Let’s take a look at the properties of a code repository.
As the word repository implies, it is a storage place. So, a code repository is a place to store code! Now that’s not special. You can simply create a folder on your computer called Source Code and put it all in there. What’s the point in giving this storage place a fancy name?
A code repository is created to use versioning systems as mentioned in the previous chapter. The code repository holds the source code while the version system software archives that code. You can archive all your files in a repository, keeping any other versions or files, even if you aren’t using them at the moment. Code repositories also give you a way to name or tag the different versions, keeping records of changes within the same project.
Choosing a repository provider
Just like there are several kinds of version control systems, there are also different code repositories. A few decentralized ones that work well with Git are GitHub and Bitbucket.
GitHub and Bitbucket host the largest decentralized collections of code repositories in the world. They hold millions of private and public projects that allow teams to work with version control.
Wait, what's the difference between public and private?
Remember the open source projects that allow pretty much anyone to contribute if they want to? That would be an example of a public project. Typically they provide their source code to the public and are open for the public to contribute to.
Private projects, on the other hand, do not share their source code but enjoy the features of Git’s version control system among their team members.
Okay, but which provider should I choose?
Although there aren’t too many differences between GitHub and Bitbucket as far as features go, GitHub is more popular with enterprise projects! It's also very easy to use.
Let’s explore GitHub in the next chapter, so we can get started with your first code repository!
Code repositories are used to store source code archives.
Code repositories allow users to:
Store source code
Use version control
Use tags or version names
GitHub and Bitbucket are the most popular decentralized code repository sites.
Code repository sites typically have public (open to use) and private (members only) repositories.