Skip to main content

Command Palette

Search for a command to run...

Exploring Version Control for Better Code Management

Published
•3 min read•View as Markdown
Exploring Version Control for Better Code Management
M
I write blogs to make concept easier for beginners.

Imagine being a developer in early 2005s or even before that . Now there will be times when you need to share your code with others or work along with them . Since you have very few options like zip folders , physical pendrive or email etc. Till now, it doesn’t seems like a huge problem , right ? . Well there are so many issues with . Let’s see them

The Pendrive Analogy in Software Development

So you will store your code in pendrive and give it to another developer to fix bugs, and he will return it to you. Again you may find a bug, that you can’t fix, then again you will give your code. And it goes back and forth for few times. Now in the meantime you can’t do anything, how will you, because you don’t have the actual files. Your code may have been overwritten so many times, and you don’t know because you can’t track it, even if you have your code. So let’s discuss the problems.


Problems faced before version control systems

Now the problems your team and you will face like not knowing who made the changes and why. Your code will be overwritten many times and since no history has been maintained that means once overwritten or deleted, it will never come back. Whoever have the main files or pendrive can work, others can’t because they don’t have the files, to put it simply only one developer can work at a time. Now you maybe thinking to solve these problems by simply having communication between teams, but imagine working with more than 1000 people. Now we have seen all the problems, how can we solve it in the next section.


Why Version Control Exists

Now to solve the problems we have something called Version Control System the most popular one git created by Linus Torvalds in late 2005 (well let’s keep this story for next time ), so it is a tool which helps us track our changes in our code and maintains history then we will know who made the changes, when the changes have been made and also what changes are being made. And most importantly we can go back in time means we can go back to our old version or code. Suppose you have mistakenly deleted your code or overwritten it, there is no chance of you going back, but version control system solves it, you can anytime revert back to your code and also come to the current code , that’s write , to simply put it you can do time travel, going back to the past code and coming back the current code, by skipping the in-between codes. That is why, we need VCS, even if we are working alone in a big project.


And this is why Version Control became mandatory in modern development and nowadays almost every developer or every company to use version control while working on anything.