DEV Community

Matheus Gomes πŸ‘¨β€πŸ’»
Matheus Gomes πŸ‘¨β€πŸ’»

Posted on

Git and Github, what's the difference?

First, hello!

Second...

What is git?

Git is a Source Control Management (SCM), it was created in 2005 by Linus Torvalds to help with Linux development.

But what is a SCM and what it has to do with git?

During the software development we want to know:

  • What has changed and when?
  • Why it changed?
  • Who did the change?
  • How can we reproduce this change?
  • Spare change?

In this case, SCM came to solve this problems with the following actions:

  • Identification
  • Documentation
  • Control
  • Audit

This actions not only for the source code but also for the user's guide and the code documentation.

I will focus now on the Control part and why it's important.

Version Control

Problem example:

You need to edit a code that is in your Dropbox. So you download the file, make the necessary changes and save the file to Dropbox.

So far no problem, let's see what happens if you're working as a team now.

Your friend has decided that he will edit the code. You download the same file together. You edit and save in Dropbox, your colleague also edits and saves in Dropbox and ends up overwriting your code. You have just lost valuable information about your modification, as your friend downloaded the old version with you and it overwrote your code.

Version control solves this problem, it does the merge between changes. So, when you have two changes they are modified to be consistent in your file.

It is worth mentioning that Git is a distributed system, so you have the repository on the server and each person who is developing the code will have a copy of its folder, without having to be connected to the server to make changes.

So Git is this, a distributed SCM that saves the life of a lot of programmers by making the process much safer, faster and more efficient, especially for programming in groups.

Okay, I understand what Git is and what it does, but ...

What is Github then?

Well, Github is a Git repository server, a kind of social network for code too. It is a recent service, created in 2008 and it has more than 10 million users and +10 million repositories. It's the most used site to open source projects.

Summing up

Git is the code versioning system. Github is a server for the codes and a social network for programmers.

If you are interested, I can make an article explaining the main commands of github such as commit, pull, push, among others. I can also talk about gitflow, an essential part of group development.

Well, that's it for now guys. I hope you enjoyed, any suggestions just leave in the comments!

Seeya!

Top comments (0)