Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

thomasritz/git-gc-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description
--------------

git-gc-cron recursively searches for .git and *.git repos in the directories
specified on the command line and runs "git gc" on them.

Make sure you only have it search repos you own.


Installation
----------------

As user or as root:

  $ gem install git-gc-cron


Put this into the system crontab (for example fcron on Linux):

  %weekly,nice(10),runas(git) * * git-gc-cron -v /var/spool/gitosis/repositories
  %weekly,nice(10),runas(me) * * git-gc-cron -v /home/me/myprojects /home/me/myotherprojects

or into your personal crontab, if you like:

  %weekly,nice(10) * * git-gc-cron -v /home/me


git-gc-cron takes any number of paths to traverse as argument.

The option -v prints the path of every repo to stdout. Remove the option -v
from the above examples if you want the cron job to be silent.

To watch the progress live you can take a look at the output of ps or top. For
each repo it compresses git-gc-cron changes the process name of the subprocess
"git gc" to something more useful:

  (#1/10 /var/spool/gitosis/repositories/myproject.git) git

About

Let cron run "git gc" on all your git repos

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages