I am starting to use git as a Subversion client at work. For now I've been using TortoiseGit, more or less how I used to use TortoiseSvn, but with local commits, branches, merges, rebases, cherry picking.
It is a big project and switching a branch and recompiling everything takes too long. This is why I want to have two (or more) working trees corresponding to two branches of the Subversion project.
I wonder if it is possible to share the .git folder for the two working trees (its 5GB), or I need to clone the repository or maybe checkout it again from subversion (it took several hours).
From the git book it seems that interaction between two git repositories will not work well if they interact with svn as well (I don't know if this applies to my case):
Don’t rewrite your history and try to push again, and don’t push to a parallel Git repository to collaborate with fellow Git developers at the same time. Subversion can have only a single linear history, and confusing it is very easy. If you’re working with a team, and some are using SVN and others are using Git, make sure everyone is using the SVN server to collaborate – doing so will make your life easier.
I would like to have a single repository with all svn branches and all my local branches and I would like have several working trees to avoid the need to rebuild everything after switching branches. Is that possible?
I don't know much about "bare" or "shared" repos, remotes and clones, a basic example to set this up would be very helpful.