Version Controlling

Embed Size (px)

Citation preview

Version Control

I am Vaidik

A B. Tech. student at Jaypee Institute of Information Technology, NOIDA.

A web developer.

A Drupal Contributor.

A Mozilla Student Rep and Contributor.

Twitter: @vaidikkapoor

Github: vaidikkp

What we will talk about?

Version Controlling The Concept

Distributed VCS vs Centralized VCS

Introduction to Git

Hands-on Git!

More Resources

Version Controlling

What is Version Control?A system that is used to record changes to a file or a set of files.

Why we need it?Keep track of changes that anyone makes to a set of files.

Revert to a particular version of your file (state) if you need to so you don't have to remember everything you do.

Compare different states of your file.

Collaborate easily, independent of geography.

Centralized vs. Distributed

Local VCS:The project is on your local machine.

Commits are stored in a local database that keeps track of changes.

Disadvantages:No way to collaborate

Single point-of-failure: if your local machine crashes, all your work is lost.

Centralized vs. Distributed

CentralizedThe VCS database is on a server accessible to everyone.

Read/update the latest snapshot of the files from the central server.

Advantages:Very easy to collaborate.

Everyone stays updated with the changes everyone makes.

A lot more control over files (like who can read/write which files, etc.).

Disadvantages:Single point-of-failure: if the server crashes or goes down, the work might get lost or nobody might be able to collaborate for some time.

Examples:CVS, SVN, Perforce

Centralized vs. Distributed

DistributedThe VCS database is on a server accessible to everyone.

Instead of reading/updating the snapshot of files, get the whole history of changes.

Advantages:Everybody has everything that is there on the server.

No single point-of-failure, everybody is happy! :)

Examples:Git, Mercurial, Bazaar, Darcs

Git

A DVCS.

Originally developed by Linus Torvalds for version controlling of the Kernel.

Originally a command-line utility, but a wide variety of GUI clients exist.

Works on Linux, Mac and Windows.

Used a lot, wide community.

Hands-on Time!

Git Basic CommandsInit

Add/Commit

Log

Revert

Branch

Merge

Merge Conflict

A common workflow

How to work with Github?Push

Pull

More Resources

More Tutorials:Git SCM Book: http://git-scm.com/book

Pro Git: http://progit.org/book/

Git Immersion: http://gitimmersion.com/

Screencast from Github: http://learn.github.com/p/intro.html

Presentation by Shakti Kannan: http://goo.gl/6BTTv

Thank You!

This presentation can be found online at http://www.slideshare.net/... (the chicken and egg problem :P)

Me:Website
http://vaidikkapoor.info

Twitter
http://twitter.com/vaidikkapoor

Github
http://github.com/vaidikkp

OSDC:Website
http://opensource.jiitu.org

Wiki
http://opensource.jiitu.org/wiki

Twitter
http://twitter.com/jiitosdc

Facebook Group
http://on.fb.me/jiitosdc