Making Sense of Version Control — Git vs GitHub

Jaimal Dullat - Oct 21 '23 - - Dev Community

As a developer just starting out, I remember being so confused by version control and the difference between Git and GitHub. Everyone in the industry was talking about these tools, but I had no idea how they worked or what they actually did.

Over time and through practice, I’ve learned the ins and outs of version control and how these two powerful tools differ. Now that I have a better understanding, I wanted to share a breakdown of Git vs. GitHub for any other newcomers out there trying to make sense of it all.

1. What is Version Control?

Before we explore Git and GitHub, let’s talk about ‘version control’. Imagine you’re writing a story and you make different drafts of it — each draft is a version of your story. Version control in coding is similar. It’s like a time machine — it lets you keep track of your code changes and go back to an old version if you need to.

2. What is Git?

So, what’s Git? Git is a free tool that helps you keep track of your code changes, like a super-smart clipboard. It’s like having a ‘save’ button for your project. You can revisit old versions of your work and see what changes you’ve made over time.

Understanding Git Better

Git is very smart. It lets you create ‘branches’ of your project so you can work on different parts of it at the same time without messing up your main project. Imagine having different playgrounds for each feature of your project. Once you’re happy with the work on these playgrounds, you can combine them into the main project.

3. What is GitHub?

Now, let’s talk about GitHub. GitHub is a website where you can save (or ‘host’) your coding projects that use Git. It’s like a cloud storage service for Git projects. But it’s also more than that — it’s a social network for coders, a place where you can work with others on projects, and even show off your work.

GitHub allows multiple people to collaborate on a single code project seamlessly.

Understanding GitHub Better

GitHub builds upon the simple foundation provided by Git. It adds more features like ‘pull requests’, which let others suggest changes to your project. It’s like asking, “Hey, I made some changes, do you want to include them in your project?”

GitHub also lets you ‘fork’ projects — this means making a copy of someone else’s project so you can experiment and make changes without affecting the original. It’s like borrowing someone’s recipe to try and make it better.

4. Git vs GitHub: Spotting the Differences

So, how do Git and GitHub differ?

Well, Git is a tool you use on your computer to track code changes.
GitHub, on the other hand, is a website where you store your projects that use Git.

You can use Git without GitHub, just like you can write a story without publishing it. Likewise, you can use GitHub’s features without using Git, but it’s primarily designed to work with Git.

5. Git and GitHub: Better Together

Git and GitHub work best when used together. Here’s a simple way to understand how they work:

  1. Create a project on GitHub: This is like creating a new folder for your project.

  2. Copy the project to your computer: This is called ‘cloning’. Now, you have a copy of your project on your computer that you can work on offline.

  3. Make changes and save them: This is where Git comes in. You use Git to keep track of your changes.

  4. Send changes to GitHub: When you’re ready, you can send your changes back to GitHub to keep them safe and share them with others.

  5. Ask others to include your changes: This is called a ‘pull request’. You’re basically asking, “Can we include my changes in the main project?”

  6. Include changes in the main project: If everyone agrees with the changes, they can be included in the main project. This is called ‘merging’.

6. Conclusion

In conclusion, Git and GitHub are two different tools that work best together. Git is like a smart clipboard for your code — it helps you track your changes and manage different versions. GitHub is a website where you can store your projects, collaborate with others, and show off your work.

By using Git and GitHub together, you can work on your projects anytime, anywhere, collaborate with others, and even contribute to other projects. Understanding these tools can make your coding journey more efficient and fun!

🔥 Wait! 🔥

Give that clap button some love! And if you’re feeling extra cheeky, hit follow too!

Follow me on Instagram: Click Here

. . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player