All About Github

Git is the world's most popular version control System. This is because if the ease of use it offers to its users and the reliability that it provides. When working with teams one of the most troubling issues is version control. Git is the main solution to this issue. Github is a web service which is providing git services and with time has become the home of the open-source community.

The Little-Known history of Git and GitHub

We already are aware that GitHub is a high-end web-based hosting for version controls using Git. It has a rather peculiar and interesting origin story to it. Starting with Git, its history our story dates back to 1991 when Linux kernel.Linux Kernel can be regarded as an open-source software of fairly large scope. For most of the years of developments software was passed around as patches and archived files.

In 2002 the Linux Kernel began using a distributed version control called BitKeeper. In 2005 the relationship between the Linux kernel development community and the commercial company that developed Bitkeeper broke down and the tools free of charge status was revoked. This paved the way for the Linux development community and in particular, Linus Torvalds – The Creator of Linux to develop their own tool based on some of the criteria learned through BitKeeper. Basic goals of the new system can be listed as Speed; Simple Design; Strong support for non-linear development and enable to handle large projects like the Linux kernel efficiently.

Since its birth in 2005, it has grown and matured to be easy to use and yet retain all those initial qualities fulfilling all the above-listed goals. Git is free and open-source and primarily used on the command line. Meanwhile, GitHub is a for-profit company not to be confused with the open source technology called Git. GitHub was formed and work began on the platform in late 2007.The company was originally named ‘Logical Awesome' and in February 2008 it was officially changed to ‘GitHub’.In June 2011 GitHub became the largest repository service surpassing Sourceforge, GoogleCode and Microsoft's Codeplex in a total number of commits.In September of 2015 GitHub reported 10 million users adding new users at a rate of 10,000 per day. Additional functions offered by GitHub compared to Git are tools such as Web-Based GUI, Desktop application development and Mobile Integration with tons of collaborating features. Moreover provides private repositories and free accounts which are usually used to host open-source software projects and building up a fast growing network every single day.

Git Commands

Init Command

The git command init is used to initialize a new repository. 

      git init [-q | --quiet] [--bare] [--template=<template_directory>]
                       [--separate-git-dir <git dir>] [--shared[=<permissions>]]
                       [directory]

Add Command

The git command add is used to stage changes to the repository. In this step the command checks whether the current changes done, conflicts with the already uploaded code.

      git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i]
                       [--patch | -p] [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
                       [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing]
                       [--renormalize] [--chmod=(+|-)x] [--] [<pathspec>…​]

Merge Command

The git command merge is used to merge conflicting staged changes

      git merge [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] [-s <strategy>]
                           [-X <strategy-option>] [-S[<keyid>]] [--[no-]allow-unrelated-histories]
                           [--[no-]rerere-autoupdate] [-m <msg>] [-F <file>] [<commit>…​] 
      git merge --abort
      git merge --continue

Commit Command

The git command commit is used to commit the staged changes to the repository. This command make the code ready to upload to the repository which is staged and merged.

      git commit [-a] [--amend] [-m <message>]

Push Command

The git command push is used upload commited changes

      git push [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run]
                         [--receive-pack=<git-receive-pack>] [--repo=<repository>] [-f | --force]
                         [-d | --delete] [--prune] [-v | --verbose] [-u | --set-upstream]
                         [-o <string> | --push-option=<string>]
                         [--[no-]signed|--signed=(true|false|if-asked)]
                         [--force-with-lease[=<refname>[:<expect>]]] [--no-verify]
                         [<repository> [<refspec>…​]]

Pull Command

The git command pull is used to download code which is pushed by other users.

      git pull [<options>] [<repository> [<refspec>…​]]


Thank you for reading this blog till the end. Hope it helps someone.

Comments