Git + SVN: A match made in ?

Embed Size (px)

Citation preview

Git + SVN:
A Match Made in ?

Types ofVersion Control

Distributed

Each checkout is a fully functional repository

Anybody may accept patches from anyone else

Anybody may send patches to anyone else

Ideal for projects with parallel feature developement

Non-Distributed

One canonical repository

All changes are submitted to the repository

All changes are retrieved from the repository

Ideal when

a canonical version is required,

access to the repository should be controlled

SVN: Strengths

Authorization/ACLs

Hooks ecosystem

Large number of OSS projects using it:

SourceForge

Google Code

Git: Strengths

Cheap, local branching

Fork code locally to patch issues

Offline commits!

Compact storage -- more compact than svn

git + svn

git tracks svn

pulls svn locally and keeps track of latest revision pulled

allows pushing back to the svn repository

Setting it up

git svn clone

Cloning

git svn init

git svn fetch

Manual init + fetch

-T indicate that checkout is from trunk

-t indicate that checkout is tags dir

-b indicate that checkout is branches dir

-s indicate that svn repo follows standard layout

Basically: git imports branches and tags!

Fun init switches

Using git + svn

Develop as usual

Use git to manage your code

git svn rebase syncs your git repo with svn repo

git svn dcommit pushes your local git commits to svn

Use cases

Experimental code

Travelling

Laundry day!

Thank you.