Git::Bunch - Manage gitbunch directory (directory which contain git repos)
To check the status of bunch (will do a 'git status' for each git repo inside the bunch and report which repos are 'unclean', e.g. needs commit, has untracked files, etc):
% gitbunch check ~/repos
To synchronize bunch to another (will do a 'git pull' for each git repo, and do an rsync for everything else):
% gitbunch sync ~/repos /mnt/laptop/repos
To backup bunch (will only rsync .git/ for each git repo to destination, and rsync everything else in full):
% gitbunch backup ~/repos /media/flashdisk
A gitbunch or bunch directory is just a term I coined to refer to a directory which contains, well, a bunch of git repositories. It can also contain other stuffs like files and non-git repositories (but they must be dot-dirs). Example:
repos/ -> a gitbunch dir proj1/ -> a git repo proj2/ -> ditto perl-Git-Bunch/ -> ditto ... .foo/ -> a non-git dir README.txt -> file
A little bit of history: after git got popular, in 2008 I started using it for software projects, replacing Subversion and Bazaar. Soon, I moved everything to git: notes & writings, Emacs .org agenda files, configuration, even temporary downloads/browser-saved HTML files. Currently, except large media files, all my personal data resides in git repositories. I put them all in ~/repos (and add symlinks to various places for convenience). This setup makes it easy to sync to laptops, backup to disk, etc. Git::Bunch is the library/script I wrote to do this.
See also File::RsyBak, which I wrote to backup everything else.
None of the functions are exported by default, but they are exportable.
Steven Haryanto <email@example.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.