Introduction
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. This was created by Linus Torvalds as existing version control systems were deficient particularly for the distributed nature of development of kernel where developers are located in different geographical areas and across multiple different time zones.
Easy to learn
Git is easy to learn and can be tried in a GIT web browser. It provides an easy way to try the git commands without installing anything on your computer. There is good git tutorial available on many websites. Git uses lot of common commands from subversion which makes it easier to migrate from subversion to git.
Main differences between Git and Subversion
- Initialization – The git init is the command to create local repository. It can be used to convert an existing, unversioned project to a Git repository or initialize a new empty repository. Subversion uses svn import command to create initial repository.
- Creating working copy – The git clone command creates a copy of the repository for modification. It is similar to svn checkout command.Unlike SVN, Git makes no distinction between the working copy and the central repository—they are all full-fledged Git repositories. All the changes that are made in the working copy are committed in the local repository, not with central repository as done in svn. The communication is mostly local and this helps improve performance and avoiding locking issues.
- Committing changes in original repository – The changes are put back in original repository by git pull or git push commands depending upon where the command is executed.
- Staging area – This is unique feature of Git. It is called index. It is kind of temporary area where the changes could be reorganized before committing to the repository. This is an additional layer in addition to working copy and repository. Once you are satisfied the changes can be committed.
Why to choose git?
Git is free and open source and has huge base of deployment of projects including the kernel. Github is a website for a specific purpose to host projects on git. Git provides both command line interface and GUI tools for those who feel more comfortable in GUI environment. Additionally as kernel is hosted on git, any deficiency/ bug discovered will be addressed quickly by kernel developers themselves. This provides another incentive for someone choosing a new version control system.
Migration Process
There is an easy to follow process described on internet including at Migration to Git from SVN.
Git Workflow
There is very good description of git workflow at Git Workflow.