Friday 21 September 2018

What is Git and Github?

We learnt about Version control systems (VCS) in the previous tutorials. If you have not gone through those already, I would suggest that you take a look at the tutorials below
Version control systems are great in managing versioning. Most important part is that VCS lets teams focus on actual development. There are many great VCS available of the shelf in the market. Git is one of the most famous VCS and it is also become an industry standard. It is very important to be skillful in understanding with Git.

What is Git and Github?

In the IT industry there are two terms that are used frequently, Git and GitHub. Both refer to two different entities, let us see what is the difference between GIT and GITHUB?

Git: It is a Distributed Version Control System for tracking versions of files. 
Github: It is  web portal and cloud hosting service for your Git repositories. 
What is Git and Github?
That’s it. Git is the magic sauce that allows you to track and host versions of files on Github. In other words, you use commands of Git to track versions of your files. And Github is just a remote platform where these files are hosted. However, if this explanation didn’t satisfy your queries then read on the following points elaborating more about these two terms and their usage: 
Note: Other examples of Distributed VCS include Bitbucket (from the famed Atlassian family which develops Jira and Bamboo), BeanstalkGitLabGitKraken

Difference between GIT and GitHub?

  1. Git allows you to track versions of your code in your local machine. However, if you want a remote backup of your code or want to publish your code to a community then you’ve to push it to Github. (More about pushing code is coming in upcoming tutorials)
  2. It’s not mandatory to use Github. Yes, you read that right. If you’re the sole person working on the project and don’t need to publish your code to the world then you can simply avoid using Github. Just track the versions of your code in local repository of your machine using Git.
  3. By this point, it’d be clear that committing the code using Git in your local machine doesn’t automatically upload it to Github too. There are two distinct terms for these activities – Committing and PushingCommitting is capturing the changes from your working copy to your local repository. On the other hand, Pushing is uploading the captured changes from your local repository to GithubCommitVsPush
  4. Neither of these processes (Committing and Pushing) are automatic. You’ve to manually select the files that you want to track. In this way, you have the control of allowing and restricting the content to track and publish. Ex: Supposed you create a temporary java class to try a particular function. As this is a temporary file to write experimental code, you don’t want to commit it. So, you have the flexibility to exclude files from being tracked by committing the files manually. 
Next, let’s take a look at various Clients to use GitClients here means software programs that can help you execute Git commands on a Git repository.
Note: Before you move forward, you will need to have Git installed on your machine. If you have not installed it yet, please follow the tutorial here: Install Git on Windows

Most popular GIT Clients

GIT BASH

It allows you to execute Git commands in conjunction with Unix commands in Windows environment. This tool will be downloaded automatically when you install GIT. Or you can install it from the Git Downloads page.
GitBash

GIT CMD

It allows you to execute Git commands in traditional Windows Command Prompt type environment. 
Git CMD

GIT GUI

Desktop application which lets you visualize the files under version control, modified files, difference between them and commit messages corresponding to them in addition to host of other features. 
Git GUI

GIT DESKTOP

Alternate to Git GUI which lets you visualize your Git repository and its history. Git Desktop allows you to do pretty much same things as Git GUI. This tools is provided by GitHub and you can download it from the Git Desktop page.
Git Desktop

EGIT PLUGIN IN ECLIPSE

This is a wonderful tool that integrates directly with Eclipse IDEEGit Plugin facilitates version control using Git in Eclipse IDE. EGit serves a huge community of Eclipse which needs version control native to their development environment. You can download EGit plugin from the Eclipse Market Place.
EGit
Git Bash and Git cmd come bundled as part of Git installation. Other clients can be downloaded as per one’s requirements from here.
As mentioned earlier, there are various platforms to host your Git repositories like BitBucket. But for this tutorial, we’ll focus on learning mainly the Git commands and Github will be choice of remote repository platform. Head over to the next tutorial to learn How to create Git Repository.

0 comments:

Post a Comment