Skip to main content

Command Palette

Search for a command to run...

Version Control System

Updated
4 min readView as Markdown
O

Back-end Developer ⌨ | Machine Learning Lover 🤖 | Native Python Coder 🐍

Version Control System

Version control system is a system that records changes to a file or set of files over time so that you can recall specific versions later.
we have probably done versioning without realizing it. Got any files like this

myresume.txt

myresume1.txt

myresume2.txt

myresume3.txt

It’s why we use “Save As” in Microsoft office. You want the new file without altering the old one.

So why do we use a version control system?

There are many benefits of using a version control system for your projects,

  • Collaboration

    With a VCS, everybody on the team is able to work absolutely freely - on any file at any time. The VCS will later allow you to merge all the changes into a common version. There's no question where the latest version of a file or the whole project is. It's in a common, central place: your version control system.
  • Storing Versions (Properly)

    Our shared folder/naming system is fine for class projects or one-time papers. But software projects? Not a chance.A version control system acknowledges that there is only one project. Therefore, there's only the one version on your disk that you're currently working on. Everything else - all the past versions and variants - are neatly packed up inside the VCS. When you need it, you can request any version at any time and you'll have a snapshot of the complete project right at hand.
  • Restoring Previous Versions

    Being able to restore older versions of a file (or even the whole project) effectively means one thing: you can't mess up! If the changes you've made lately prove to be garbage, you can simply undo them in a few clicks. Knowing this should make you a lot more relaxed when working on important bits of a project.

Learn the terminology

Most version control systems involve the following concepts, though the names may be different. This is just to give you a basic understanding of what is being done with a VSC

  • Repository (repo): The database storing the files.
  • Server: The computer storing the repo.

  • Client: The computer connecting to the repo.

  • Working Set/Working Copy: Your local directory of files, where you make changes.

  • Trunk/Main: The primary location for code in the repo. Think of code as a family tree — the trunk is the main line.

  • Branching: Branches let us copy code into a separate folder so we can work with it separately.
  • Merging: Apply the changes from one file to another, to bring it up-to-date.

  • Add: Put a file into the repo for the first time, i.e. begin tracking it with Version Control.

  • Revision: What version a file is on (v1, v2, v3, etc.).
  • Head: The latest revision in the repo.
  • Check out: Download a file from the repo.
  • Check in: Upload a file to the repository (if it has changed). The file gets a new revision number, and people can “check out” the latest one.

  • Checkin Message: A short message describing what was changed.

  • Changelog/History: A list of changes made to a file since it was created. Update/Sync: Synchronize your files with the latest from the repository. This lets you grab the latest revisions of all files.

  • Revert: Throw away your local changes and reload the latest version from the repository.

Examples of version control system are Git, Gitlab, Bitbucket, Beanstalk, PerForce,CVS Version Control (Concurrent Versions System) and so on.

Types of version control system

  1. Local version control system
  2. Centralized version control system
  3. Distributed version control system

Local Version Control System

Local version control system maintains track of files within the local system. This approach is very common and simple. This type is also error prone which means the chances of accidentally writing to the wrong file is higher.

Centralized Version Control System

In this approach, all the changes in the files are tracked under the centralized server. The centralized server includes all the information of versioned files, and list of clients that check out files from that central place.

Distributed Version Control System

Distributed version control systems come into picture to overcome the drawback of centralized version control system. The clients completely clone the repository including its full history. If any server dies, any of the client repositories can be copied on to the server which help restore the server. Every clone is considered as a full backup of all the data.

usedf.png

L

Good explanation! 👏🏻

O

Thanks

Version control system

Part 1 of 1

In this series, I will introduce version control system, the types of version control system we have and we will take a look at the most popular version control system developers use today Git.

More from this blog

olalekan temitayo

10 posts

Back-end Developer ⌨ | Machine Learning Lover 🤖 |Native Python Coder 🐍