git gc command can be used to optimize the git repository by cleaning up the unnecessary files. The optimization takes some time. We can schedule a cron job to run it:
crontab -e
and schedule the jobs like below:
0 1 * * * cd /path/to/git/Proj1.git; git gc --aggressive
0 2 * * * cd /path/to/git/Proj2.git; git gc --aggressive
the two lines above optimize the two git repositories Proj1.git and Proj2.git at 0am and 1am everyday.
See also
- Migrate a cvs repository to a git bare repository
- CVS to git Transition Guide
- Git Book - Set up a public repository
- Git Book - Set up a private repository
No comments:
Post a Comment