

Ask HN: git-svn resources? - rmk

Hi folks,<p>I have used git for brief periods (as a student), and would like to continue using it, but the company I work for uses svn. I do not like svn.<p>I noticed that you could still use git + svn, via git-svn, where there is a 'two-tiered' commit system.  I want to use this primarily to be able to make branches at will, try out code, and commit the branch if everything goes well.  This process is <i>not easy</i> in svn.<p>Could you point me to resources about git-svn?<p>Also, it would be great if you could recommend a git book to me --- there's a lot of cool things that could be done with git, only I need to know where to look!<p>Thanks
======
boyter
This is going to sound rude, but how about you do what the people paying you
tell you to do? Thats why they give you money, to provide them value which you
will not be doing while trying to circumvent their procedures and rules.

Maybe they evaluated GIT and decided their business case suited SVN more?

You wouldnt code your stuff in PHP if they are an ASP.NET shop because you
like PHP more would you? By all means try to educate them to use what you feel
is a better tool, but until then suck it up and do what everyone else is
doing.

~~~
aquadoctorbob
I think you've misinterpreted the OP or the purpose of svn-git -- that
programming language metaphor doesn't work at all.

Rather, everybody at his job uses Notepad and he'd like to use vim. It
improves his performance and affects nobody else.

~~~
boyter
Perhaps. But think of it this way, if he wastes any time figuring out how to
do something using GIT or corrupts the repository, or breaks something and has
to spend time fixing it, the time is on his hands. If you are using SVN like
everyone else then its not your issue.

I have found in the workplace it is better to stick to what they supply and
ask you to use and change it by pushing people in the right direction then to
assume you know better and do your own thing.

Look at it from the employeers perspective. If you say use SVN and someone
says "Pffft I will use GIT" and then they loose a days work because of it who
am I going to blame?

~~~
rmk
You are assuming that the employer doesn't care about improved workflows, and
also that the employer has already evaluated git thoroughly.

Ever considered that you might be wrong on both counts?

~~~
boyter
Yes I have. If you think circumventing the procedures your workplace follows
because you dont like them is going to endear you to your employeers then go
ahead. Part of being in a workplace is following the rules. Dont like them?
Then change them internally or leave. People who are not team players are not
useful in the workplace no matter how productive they are individually.

~~~
rmk
I think you are mistaken. We are starting to institute procedures, and the
boss is very reasonable. He'll accept a solution in which the workflows are
more natural. He has accepted procedures / choices that I have advocated in
the past (with well-reasoned arguments in support of my choices, of course).

Arguing that the 'main' repo has to be git is a tough sell, but I think we'll
get there eventually, once we show how much easier experimental branching,
disconnected operation, distributed nature etc will be advantageous to us.

The git-svn solution is pretty good, because the main repo will be svn, and
people who are used to svn (and like the restrictions that come with it) will
be happy as well. Git users will also be able to get all the benefits of using
it..

~~~
boyter
I that case I apolagise. It seems you were asking a technical question (which
you already knew the answer too) but seemed to phrase it as a policy question.

The other alturnative is to check out using SVN, check that into GIT, do your
changes as normal from here and when finished check back into SVN. You only
branch and so forth on your local machine but it also ensures you dont break
the main repo.

------
notaddicted
I have this bookmarked: <http://andy.delcambre.com/2008/03/04/git-svn-
workflow.html>

------
angelbob
Here's one I liked: <http://flavio.castelli.name/howto_use_git_with_svn>

