About Me

My photo
Drum & Bass Producer, Software Developer, Love my Cats

How-To: Getting Started with Git Tutorial

Introduction to Git - revision control system

Git is a compact and agile system for source code managment.

What is a revision control system?

Developers want a system to save & load changes they made to source code.
So that code is not stored locally and prone to be deleted.
So that peer developers can keep their code common and updated.
So that a developer can revert to an older version easily.

Main functions of a revision control system

Commit - sending one's changes to the repository.
Check-out - downloading the current version of the code merged from peers' commits.

Referring to different versions of the source code

Branch - a version of the code.
Trunk - the base branch, common to all peers.
Tag - a branch with a catchy name, like 'beta', or 'v2.3', etc..
Fork - a branch from somebody else's source code, like from github.com.

How is Git different from other revision control systems?

Git is distributed, which means each developer's computer acts as a repository. Local versioning allows more control over changes before committing them to the central repository.

Interaction with Git - how do I use Git's functions?

Most developers choose the Command Line Interface, called the Git Bash.
Find your way to your local repository using 'cd', and use Git commands to manage source code.

Some of the most useful git commands:

git init - starts a new repository
git commit - commit your changes to local git
git checkout - check-out code to your local repository
git merge - merges a couple of branches
git tag - give a catchy name to a branch

I've started working with Git only a few hours ago, and I'm sure there's a lot to learn. Hope you find this Getting started with Git Tutorial effective!