By far, the most widely used version control system is Git. Rather than having one single place for the full version history of the software, every developer’s copy of the code contains the full history of changes. In addition to being distributed, Git has been designed with performance, security and flexibility in mind.
Setup a repository
After installing git, you need to setup your repository to have a virtual space for your project We assume that we have a project already and we need to version it with a new git repository:
This command will map remote repository at
<remote_repo_url>to a ref in your local repo under
Now you can push local branches to your remote repository:
git push -u <remote_name> <local_branch_name>
This command will push the local repo branch under
<local_branc_name>to the remote repo at
Default custom setting
The first thing you’ll want to do after installing Git is tell it your name/email and customise some of the default settings.
git --global user.name "John Smith" git config --global user.email email@example.com
You could also setup your favourite editor and a few other settings as you wish.