On Thu, 3 Mar 2011 12:21:44 +0000 seanh <snh...@gmail.com> wrote: > I think the happy medium between one big repository and too many small > ones is to have one default repository for your homedir and a few (but > not too many) additional repositories for things that don't belong in > the default repository for some specific reason. > > One big advantage of having most stuff in a single default repo is > moving it around. If I decide to rearrange some of the top level dirs in > my homedir, even delete some dirs or add some new ones, or move some > files from one top-level dir to another, I can do this with git mv etc, > and the changes will be versioned. If each top-level dir was its own > repo it would be very awkward to do this sort of thing, you're sort of > tying yourself in to your top-level organisational decisions. I change > my mind a lot, so I hate that.
Yep, I agree. It's just that I had the impression from Martins' and Penny's posts they implied using fake bare git repo's for pretty much every single directory/application, or maybe I missed something. > One thing I have started using recently is git submodules. Take my > dotfilemanager script, it's a publicly-available project that has its > own git repository, but I also want a copy of dotfilemanager to exist in > my ~/scripts directory, which is on my $PATH, and is versioned in my > 'default' git repo. I don't want to maintain two copies of the script, > one in the public dotfilemanager repo and one in my default repo, that > would be awkward. I work the other way around, which is much simpler: I add all directories that contain executables I like to my PATH. So my $PATH contains a lot of code/project_foo directories. It means I cannot leave project code in a broken state, but in practice, this didn't turn out to be a problem. > So I added the dotfilemanager repo to my default repo as a submodule, > located at ~/git/default/scripts/_dotfilemanager/, then I added a > symlink to the default repo: scripts/dotfilemanager -> > scripts/_dotfilemanager/dotfilemanager.py. The end result is that there > is only one copy of dotfilemanager, it is versioned seperately in its > own repo, but there is still a dotfilemanager script in my scripts dir > and on my path. Hmm, this seems a bit complicated to me. So for every such code project, you add it as submodule to your main repo, *and* you need to make symlinks for all executables in such submodules? > I now do this with a number of scripts that I wrote for my own personal > use and want to have in my scripts dir, but that I also want to host in > a public git repo somewhere. > > http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/ > > http://book.git-scm.com/5_submodules.html interesting, i've now also switched to a submodule/pathogen-based vim setup (forked from some else actually, https://github.com/Dieterbe/vimfiles) Dieter _______________________________________________ vcs-home mailing list firstname.lastname@example.org http://lists.madduck.net/listinfo/vcs-home