git svn - How to use git when pair programming -
i working on apache project. seeking advice on how best use git support our unusual workflow. i'm familiar main git commands inexperienced in using on group project.
on team pair-program and, various reasons, swap developer's machine we're working on several times per day.
the central source code repository svn read-only git mirror exists.
i'd partner , able pull commits each other's local repositories, , (less frequently) fetch updates server , commit it.
it seems won't play nicely "git svn", stated on https://www.kernel.org/pub/software/scm/git/docs/git-svn.html:
"it recommended git svn users clone, fetch , dcommit directly svn server, , avoid git clone/pull/merge/push operations between git repositories"
what's best way use git support our workflow? example, easier if clone read-only git repository instead of using git svn, , commit svn repo applying patches separate 'git svn clone'-d repo?
any advice gratefully received.
we use master repo on github.com , have 4 developers working off of local clones. subscribe using git flow ease in managing our branches (development, master, hotfixes, releases, features, etc.)
we encourage read on a successful git branching model, use single remote repo gold standard (which meta-thought in git, there no such thing master svn). dev on non-master branches, pulling single remote (not pulling each others local repos).
there wide variety of ways leverage git in development workflow. 1 has worked our team.
so how might in environment?
you have svn repository (lets call it svn), have read git mirror of that, lets call rorepo. suggest cloning rorepo third remote repo, lets call flowrepo. 'git svn clone' svn repository svnrepo.
flowrepo should (dev1) , partner (dev2), , else (devn) clone from. end dev1repo , dev2repo. these dev repos never pull or push each other, pull/push flowrepo.
from there, encourage embrace gitflow model, not because provides black magic, because provide easy handles learning/managing development workflow in git (things working dev branch, using feature , hotfix branches, release branches, etc. work git-flow handling more complex git commands behind scene you).
you , partner push/pull flowrep regularly throughout day. on dev branch, if sharing work on feature branch might push/pull there on ocassion.
as (rarely, , typically release/hotfix) hit points need push svn, create patch (you want nice script handle isn't manual) flowrepo applied svnrepo , sync'd svn repository.
our team did year success until moved off of svn altogether , had pure git scm solution.
why not clone svnrepo , skip flowrepo altogether?
basically because tied svn, , while branching , committing cheap in git, tend more expensive in svn.
when using git-svn, best to:
- minimize number of branches have sync svn repo
- don't count on seeing merges between branches done in git published in svn: won't appear. commit made on git branch(es)
`dcommitsvn there.
therein lies issue, because git-flow (a branching model) great @ creating branches representing application development life cycle (feature, hotfix, dev, release, etc.), expensive sync svn.
this not can't done, on time, believe has lot of potential more difficult maintain.
Comments
Post a Comment