Why should you learn git as a student developer?

Why should you learn git as a student developer?

What is git, and why is it essential to understand the fundamentals of git?

ยท

3 min read

Today, almost every job description mentions git as a mandatory skill requirement. And even if they don't say that, they expect you to be well versed with it and will ask for your Gitlab/Github profile links to check your contribution and projects. But why is git so important? Let's take a sneak peek into this.

Sneak Peek

If you are working on a solo project, the development and maintenance of code are done by one person: you. But how would you collaborate and work on a team project? How do you handle the tasks? For example, Tom and Jerry are working together to build an E-commerce website. They have jotted down their plan and designs. They have also divided who should work on which functionality. So far, so good. They start working, and in a few days, they notice that a few features Tom is working on require Jerry to complete his ongoing task/feature. And Jerry notices that his current feature requires some information from a flow that Tom created last week, but he doesn't have it since they could not sync their code and connect it.

Yes, they can catch up one day to discuss their changes and sync their files manually so that no existing piece of code is erased/overwritten with a previous "version" of the code. But is this not time-consuming? And this effort is only for a team of 2 people. How would a team of more than two people work together on the same project? It's not very often that every team member works on a completely independent task while building a feature. And even if that is the case, we must get all these features together (a.k.a files under one single folder) to complete the project and get it working. How is this handled?

Sad Tom and Jerry

This is where Distributed Version Control Systems (DVCS), popularly known as a peer-to-peer version control system, swoops in and saves the day. According to Wikipedia,

Distributed version control (also known as distributed revision control) is a form of version control in which the complete codebase, including its entire history, is mirrored on every developer's computer.

To put it simply, DVCS is the software that helps developers synchronize their code with every other dev working on the team. It saves devs from the above arduous task of manual synchronization. Various DVC systems like Mercurial and Bazaar exist, but Git is the most recognized.

There is so much more to git than just code synchronization. The advantages of git are numerous but given below are just the top few:

  1. One of the best tools to enable collaboration among developers and various teams.
  2. Truly enables parallel development. Git allows changes done to the same file by multiple people to be reviewed and merged easily.
  3. Maintains history of changes which helps devs refer to older versions of code and restore previous versions of code if required.

Yay

Every student developer needs to understand git (at least its basics). Although git is not really a programming language, it is the tool that helps you showcase your skills to the world. Is it too early for student devs to learn git? Never, in fact, the sooner, the better. Git is not just a skill. It is a developer's superpower. Let's explore a few basic git terminologies, a step-by-step guide to set up your first git repository, and basic commands in the upcoming posts.

PS: Please note that Git and Github are not the same ๐Ÿ˜…. One of the DVC systems is called git, and various software tools enable developers to use git. A few prominent ones are: Gitlab, Github, and Bitbucket.

ย