An introduction to git

Post on 16-Jul-2015

253 views 0 download

Tags:

transcript

An introduction to

“the stupid content tracker”

History• Git was created to manage Linux Kernel development

• April 2005

• Linux Torvalds, Junio Hamano

• http://en.wikipedia.org/wiki/Git_(software)

What’s this git git?• 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.

• Git manages changes to a tree of files over time

Why git?• Outclasses SCM tools like Subversion, CVS, Perforce, and

ClearCase

• Git is optimized for:+ Distributed development + Large file counts

+ Complex merges + Making trial branches

+ Being very fast + Being robust

Basics• Local & Remote repositories – because its distributed

• Cloning a remote repository• git clone <remote-repo-url>

• Clones a remote repository with all its history etc. (.git contains that info.)

• Initializing a local repository• git init

• Initializes git repository, creates a .git in the current dir.

Hands on with Git

• “git add .” to add all files (except .git!) – note the .• Then “git commit” for the initial commit

• Creates current branch named “master”

Push & Pull• Changes are committed to local repo. first

• Push to remote to share with others

• git push <remote-repo> <local-repo>• Initializes git repository, creates a .git in the current dir.

• Pull changes from Remote repo.

• git pull• Initializes git repository, creates a .git in the current dir.

Practice

Got 15 minutes and want to learn Git?

try.github.io

File Status Lifecycle

Github Client App

Github Client App

Reference Material

•Cheat Sheets

•Posters

Learn more about it

•Linus Torvald’s talk on git: youtube.com/watch?v=4XpnKHJAok8

Lets get rolling..