Understanding GIT and GitHub

In this article I’ll explain you what is GIT and GitHub ? May be you have a basic idea about git or you just heard about it.  First I would like to start with GIT. Understanding GIT will give you better understanding what GitHub is.

Git vs GitHub

What is GIT ?

GIT is a widely used distributed  version control system for software development.  Git is responsible for keeping track of changes to content (usually source code files), and it provides mechanisms for sharing that content with others. It is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. It provides you the source code  management.

Git works by reading a Local code repository (just a folder containing code for your project) on your computer and the mirroring that code. Git stores and thinks about information much differently than systems like SVN .

Git is a version control system; think of it as a series of snapshots (commits) of your code. You see a path of these snapshots, in which order they where created. You can make branches to experiment and come back to snapshots you took.

Concepts from Git: Repositories, branches, remotes, committing, pushing, pulling, merging, reverting, and cherry-picking.

Features

  1. Branching and Merging  The Git feature that really makes it stand apart from nearly every other Source Code Management (SCM) out there is its branching model. Git allows and encourages you to have multiple local branches that can be entirely independent of each other. The creation, merging, and deletion of those lines of development takes seconds.

  2. Small and Fast : Git is fast. With Git, nearly all operations are performed locally, giving it a huge speed advantage on centralized systems that constantly have to communicate with a server somewhere.Git was built to work on the Linux kernel, meaning that it has had to effectively handle large repositories from day one. Git is written in C, reducing the overhead of run-times associated with higher-level languages. Speed and performance has been a primary design goal of the Git from the start.

  3. Distributed : One of the nicest features of any Distributed SCM, Git included, is that it’s distributed. This means that instead of doing a “checkout” of the current tip of the source code, you do a “clone” of the entire repository.

  4. Data Assurance : The data model that Git uses ensures the cryptographic integrity of every bit of your project. Every file and commit is checksummed and retrieved by its checksum when checked back out. It’s impossible to get anything out of Git other than the exact bits you put in.

  5. Staging Area : Unlike the other systems, Git has something called the “staging area” or “index”. This is an intermediate area where commits can be formatted and reviewed before completing the commit.One thing that sets Git apart from other tools is that it’s possible to quickly stage some of your files and commit them without committing all of the other modified files in your working directory or having to list them on the command line during the commit.

  6. Free and Open Source : Its free and Open Source. You can download and start using GIT.

What is GitHub ? 

GitHub is a Web-based Git repository hosting service. It offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. Unlike Git, which is strictly a command-line tool, GitHub provides a Web-based graphical interface and desktop as well as mobile integration. It also provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project.. If your team has a shared repository on GitHub, you could conceivably use GitHub without ever looking at its website. But, the website provides a lot of value on top of the core Git repository.

GitHub allows you to:

  • Share your repositories with others.
  • Access other user’s repositories.
  • Store remote copies of your repositories (github servers) as backup of your local copies.
  • You can create your public and private repositories.

Concepts from GitHub: Pull requests, issues, wikis, forking someone else’s repository, Gists, github.com.

Can you use Git without GitHub? If yes, what would be the benefit for using GitHub?

Yes, you can use Git without GitHub. Git is the “workhorse” program that actually tracks your changes, whereas GitHub is simply hosting your repositories (and provides additional functionality not available in Git). Here are some of the benefits of using GitHub:

  • It provides a backup of your files.
  • It gives you a visual interface for navigating your repos.
  • It gives other people a way to navigate your repos.
  • It makes repo collaboration easy (e.g., multiple people contributing to the same project).
  • It provides a lightweight issue tracking system.

I hope that this helps everyone new to web development understand the differences between Git and GitHub..

Enjoy..!!

Leave a Reply

Your email address will not be published. Required fields are marked *