Sitemap

Why Git and GitHub

2 min readJun 25, 2020

--

What is git?

Git is a version control system for tracking changes in the source code during software development. It is free to use. It was made by Linus Torvalds, the person who made Linux. Git was initially released on 5th April 2005. To date, git has been one of the majorly used version control systems in almost all software companies.

Why git?

Git was designed by Linux Torvalds for his personal use. As he mentioned in one of his interviews, it was getting tough for him to manage different versions of the software which he was building at that time, then he went on building a version control system!

Get Niranjan Kumar A’s stories in your inbox

Join Medium for free to get updates from this writer.

Git tracks the changes done by the coders into a project. There is a certain record with comments on each of the changes done to a project. This is very helpful in an open-source project. There will be many contributors in an open-source project, the git helps us see the changes done to a file in the project. We can even roll back to the previous version of the file.
Git makes collaboration and merging code easier, this helps in building great open-source software.

How to download git?

We can download git by clicking into the link below
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

The workflow of Git -

  1. Write code
  2. Store changes
$ git add .

3. Commit changes

$ git commit

4. Push changes

$ git push

5. Make a pull request

$ git pull

Important commands in Git

  1. To check the git version
$ git--version

2. To create a file in your project

$ touch index.html

3. Initialize it as git repository

$ git init

4. Add a file

$ git add . 
or
$ git add (file name)

5. To check the status of the file

$ git status

6. Remove a file

$ git rm--cached (file name)

7. Commit the changes

$ git commit -m 'comment the progress done to the file'

What is GitHub?

Press enter or click to view image in full size
  • GitHub is a hosting platform for git repositories. GitHub provides a web-based graphical interface with the users.
  • This is a platform built for developers, it can host, review code, and manage projects. It is mainly used for open source development and businesses.
  • This was founded in 2008, GitHub is currently owned by Microsoft.
    https://github.com/

Workflow of GitHub

  • Write code
  • Commit changes
  • Make a pull request

--

--