VCS. Three letters that can change your life

Preview:

Citation preview

VCSThree letters that can change your life

WHY DO I TALK ABOUT THIS?

MEET MAIN CHARACTERSThis is a story with a few characters. Let meet

them!

Cthulhu The Cute

Twilight The Gentoo Pony

Shadow The Gamer

ONCE UPON A TIME IN R'LYEHPROGRAMMING UNIVERSITY...

Shadow played games the whole semester. Atthe end of the semester he had to do a lot of

tasks but he did not know how.

So he asked Twilight for help

And then the terrible thing happened

CUTE CTHULHU'S WISE WORDS:

SO WHY DO I TALK ABOUTTHIS?

BECAUSE...Sharing source code as attachments in social

networks is like using stone instrumentsnowadays

BECAUSE...Version control systems simplify software

development

Especially when several people work on thesame code together

BECAUSE...It is vital to programmer to know how to use

version control systems

BORING PART

WHAT IS VERSION CONTROLSYSTEM?

“ Version control is a system thatrecords changes to a file or set of

files over time so that you canrecall specific versions later.”

GOALS OF VCSAllow developers to work simultaneously.

Do not overwrite each other’s changes.

Maintain history of every version ofeverything.

VCS CLASSIFICATIONCentralized version control systems (CVCS)

Distributed version control systems (DVCS)

CENTRALIZED VCSThere is a single “central” copy of your projectsomewhere, and programmers commit their

changes to this central copy.

CVCS WORKFLOW1. Pull down any changes other people have

made from the central server.

2. Make your changes, and make sure theywork properly.

3. Commit your changes to the central server,so other programmers can see them.

DISTRIBUTED VCSDo not necessarily rely on a central server to

store all the versions of a project’s files.

Every developer clones a copy of a repositoryand has the full history of the project on their

own hard drive

ADVANTAGES OVER CVCSFaster

Nobody sees unfinished work

Less dependent on Internet

VERSION CONTROL SYSTEMSAbout 46 VCS exist now ( )https://goo.gl/imTGhs

THE MOST POPULAR VCSSubversion

Git

Mercurial

INTERESTING PART

HELLO, GIT!

INITIALIZE AN EMPTYREPOSITORY

git init

ADD FILESgit add

COMMIT CHANGESgit commit

WHAT IS YOUR STATUS?git status

LOCAL HISTORYgit log

 

BRANCHESgit branch

SWITCH WORKING TREEgit checkout

GET IT TOGETHERgit merge

PUT ONE ONTO ANOTHERgit rebase

WORKING IN TEAM

REMOTESgit remote add <name> <address>

SEND COMMITS TO REMOTEgit push <remote> <branch>

UPDATE FROM REMOTEgit fetch <remote>git pull <remote>

WHAT TO READ NEXT?

GITGit documentation

Atlassian tutorials about git

Git in 15 minutes

Git tree planting

What to do if you messed your Git repository

MERCURIALMercurial official website

Great Mercurial tutorial

Comparison of Git and Mercurial

Working qwith bookmarks

Presentation by Oleksandr Kovalchuk

THE ENDANY QUESTIONS?

Recommended