GitHub as a Time Traveler
Tags: github, git, programming, beginners
Published: 2024-04-23 19:52:58

GitHub and Git are popular keywords that you probably have heard if you have been in the developer community/underworld for long enough. And if you've searched about them yourself, you probably have been confused by the underlying concepts associated with them. Well, to be honest, I was. And at that time, I was able to learn about these concepts with the guidance of my friends and colleagues who had already been pretty familiar with version control.

Before understanding what is GitHub and Git, we first have to imagine. ✨

## Let's Imagine "Git"

Imagine you're a time traveler, who wants to document everything that has happened in the "sacred" timeline, including the past, present and future. To accomplish this, you have a time machine which helps you jump between different points in time, so that you can view them, make changes and discover alternate paths without losing track of where you're supposed to be.

The Time Machine is the Version Control, where each point in time are different version, and each branch is a different reality.

Git is an open-sourced **version control** system that does everything.

> **Open Source Code**  
> Being freely available to everyone, to use, study, modify and distribute. Usually, the software is open-sourced, so anyone can see how it works and make changes to it if they want to. This makes open-source software very versatile and adaptable

## Inside "Git"

`// RECAP //`  
Git acts as your time machine. It keeps track of all the changes you make to your code over time and allows you to revisit any point in its history.

Your codebase is now basically a timeline, that extends from the beginning of your project to the present. Each point in the timeline refers to a specific version or state of code


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2xq3qf10tmkrpjlnobs.png)


From the image, `v1.0` , `v1.1` and `v1.2` are versions of code saved in the timeline \[shown as blue\]

Now, you can make changes and get them out as new versions, `v1.3`  
You could also create a branch, by making changes to a previous version, building better software. These will be discussed later on.

## **Why "Git"?**

Advantages include:

* Performance
    
* Security
    
* Flexibility
    

And most importantly, its **OPEN SOURCE**, making it well-managed and considered a de facto standard by large organizations and individuals.

## What's "GitHub"?

> It's the largest, most complete developer platform in the world.

GitHub is a cloud-based platform that hosts code for various purposes. These include collaboration, version control, open sourcing, etc...

As a time-traveler, you store different versions accessible to all, in a single codebase around the world, called "GitHub" and a GitHub Repository is the folder in which you store all this stuff.

To be precise, GitHub Repository acts as a remote storage space for your code's timeline. Each update is stored inside this repository as a vault, only giving access to who you define.

## Branch "Git"

Imagine as a time traveler, you can create your own parallel timelines or branches, different from the main timeline. Each branch represents a separate path or idea that you want to explore without affecting the original. This space where you can experiment freely, is what truly the advantage of "Git" and other version control systems (VCS).


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j744rx34av8kuq4makhn.png)



## Merge "Git"

At some point in time, you may want to integrate these changes to your code from a branch back into the main timeline. This process is called merging, where we are combining the changes made in one branch with another. It allows you to bring different versions together and reconcile any conflicts.

## More to "Git"

Similar to how a time traveler wants to share his experiences with his/her fellow time travelers. GitHub allows the features to collaborate your code with others so that they can view it, make changes to it and update parts of your code. These updates are done by making a **pull request!**

These changes can then be viewed or moderated by you, or the maintainer, and then be pushed as a commit. Anyone can clone your repository or "**fork it**", and make changes to it. Licenses play a part when it comes to the distribution of software at different levels, but that's for later on.

### Conclusion

We have reached the end of our time traveler quest, but the possibilities with Git and GitHub are seemingly limitless. There is a lot these bad boys can do. You can learn from various articles and books like Git for dummies. You can learn more about how to use them in a real project scenario further in this series, where I blog on how to learn GitHub efficiently.

*Thanks for reading, drop a like, and till the next time, keep on experimentin'*