Git was created by Linus Torvalds in 2005 and its current maintainer is Junio Hamano. It is distributed version control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files.
GitHub is a web-based version-control and collaboration platform for software developers, where developers store their projects and network with like minded people.
The Git history is stored in such a way that the ID of a particular version (a commit in Git terms) depends upon the complete development history leading up to that commit. Once it is published, it is not possible to change the old versions without it being noticed.
Terminology in Github
1 . Repository
A repository (“repo”) is like a folder for your project. It is a location where all the files for a particular project are stored. Each project has its own repo, and you can access it with a unique URL.
GitHub allows developers to change, adapt and improve software from its public repositories. Public repositories are for free and visible to everyone, but private repositories are charged, offering various paid plans and Only the owner and collaborators can view or contribute to a private repository. .
Each public or private repository contains all of a project’s files, as well as each file’s revision history. Repositories can have multiple collaborators and can be either public or private.
Repositories can be published via Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), rsync(removed in Git 2.8.0), or a Git protocol over either a plain socket, or Secure Shell (ssh).
2 . Commit
The “commit” command is used to save your changes to the local repository. The
git commit command captures a snapshot of the project’s currently staged changes.
Fork is also known as a branch is simply a repository that has been copied from one member’s account to another member’s account. If a member wants to contribute to a project he can fork the repo, make changes and release the revised version, without affecting the original code.
In Git, branches are very light weight, a branch is only a reference to one commit. Full branch structure can be constructed using its parental commits.
It is the default development branch. Whenever you create a git repository, a branch named “master” is created, and becomes the active branch.
5. Pull request
User has forked a repository, made modifications and now like to share the modifications, he can send a pull request to the owner of the original repository. The owner of the original repository can see the modifications, and then choose whether or not to pull the modifications into the repository, he can accept the modifications and merge them with the original repository.
Head is a reference to the last commit in the currently check-out branch. It can be treated as the “current branch”.
7. Detached Head
The detached head state occurs in git when head ,the part of git that tracks what your current working directory should match is pointing directly to a commit rather than a branch.
The local repository consists of three “trees” maintained by git, first one is your
Working Directory which holds the actual files, second one is the
Index which acts as a staging area and finally the
HEAD which points to the last commit you’ve made.
A reference typically used to mark a particular point in the commit chain. In contrast to a head, a tag is not updated by the commit command.
Git Changelog comes with Grunt plugin and CLI .When you’re working on projects and to know what stuff have been changed, added or fixed. Git looks for merge commits within the repository to generate changelog entries and track all changes in your code.
It is more useful when multiple people collaborate on a project, it’s hard to track revisions, who changed what, when, and where those files are stored. GitHub takes care of this problem by keeping track of all the changes that have been pushed to the repository.
git changelog is a command for managing a changelog in Markdown format for a git project.
Git hooks are scripts that run automatically every time a particular event occurs in a Git repository. They let you customize Git’s internal behavior and trigger customizable actions at key points in the development life cycle.
12. Social coding / Social networking
GitHub facilitates Social coding by providing a web interface to the Git code repository and management tools for collaboration. Every user on GitHub has their profile that acts like a resume, displaying their past work and contributions to other projects via pull requests. Users can follow each other, rate each other’s work, receive updates for specific projects and communicate publicly or privately.
Features on Github :
- Github Desktop : It enables users to access GitHub from Windows or Mac desktops, rather than going to GitHub’s website.
- Github Gists : It allows users to instantly share codes, notes and snippets.
- Github Flow : GitHub Flow is a simple and effective branching strategy which the folks at GitHub use.
- Github Pages : These are static webpages to host a project, pulling information directly from an individual’s or organization’s GitHub repository.
Now after this introduction you can experience the world of Github visit here .