DEV Community

Cover image for Git and Github
Temitope Ayodele
Temitope Ayodele

Posted on • Edited on

Git and Github

tl:dr Git is a version control system that is installed locally on the computer, while Github is a cloud based git repository hosting service.

Okay, there we go. What is Version control system? You need to understand version control system to understand git and github.

What is Version Control System?

Version Control helps you to keep track of your project over time.
In a software development project, changes are constantly made. Version control system is used to keep track of these changes.

Version control:

  • ensures that different versions of a software can be maintained.

  • allows you to track progress in the separate versions, and merge to a common area when done

  • allows for developers collaboration on a project.

  • make undoing changes possible, since changes are tracked.

There are different version control systems: Git, TFS, CVS, Mercurial, etc.

branching

Now that we know what Version control is,

What is Git?

Git is the most popular version control system used today. It is installed locally on the system. It is used for tracking changes in computer files and coordinating work on those files among multiple developers. Git is the most popular because it is free, it is very easy to use and it is responsive. Git has the functionality, performance, security and flexibility that most teams and individual developers need.

For versioning, Git uses the branching model. With this, you can create independent local branches in your code. You can also switch between branches, delete branches you are done with, recall branches, make individual changes to different branches, reconcile the branches to a common branch, then compare the changes between the different branches and merge the branches together.

You can check some important git commands on this post

What is Github?

Developers on a project

Github is a cloud based hosting service. It is an online database. With Github, you can keep track of your version control projects outside your local computer. With Github, you can also share your projects.

Github is like an 'online hub' where developers store their projects and network with like minded people. It makes collaboration easy.
You can share your code with other people, and even give them permission to review the code, make changes to different git branches of the project.

With Github, you can
create a repository - start a new project,
clone a repository - download a project locally for use, of to make new changes and then request for a merge,
fork a repository - build a project on another project that already exists. You see a project you like, you can fork it, make your own changes then push it up on github as a new repository.
pull requests - After developers have worked on their respective branches, they can request that the change be added to another branch to update that branch with the new change you made on your own branch. To do this, you make a pull request, then when the request is reviewed and accepted, your branch is merged. A pull request can also be made when you make changes to a forked repository.
change logs - When different changes are made on a repository, github keeps track of all individual changes.

In conclusion, Git is a version control system installed on a computer while Github is like an online hosting platform for your git projects.

Top comments (0)