AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
# C.20 GitGcTask Cleanup unnecessary files and optimize the local repository. Table C.21:聽Attributes NameTypeDescriptionDefaultRequired`gitPath``String`Path to Git binary./usr/bin/gitNo`repository``String`The repository to cleanup.n/aYes`aggressive``Boolean`This option will cause git gc to more aggressively optimize the repository at the expense of taking much more time. See --aggressive option of [git-gc](http://www.kernel.org/pub/software/scm/git/docs/git-gc.html).`false`No`auto``Boolean`With this option, git gc checks whether any housekeeping is required; if not, it exits without performing any work. See --auto option of [git-gc](http://www.kernel.org/pub/software/scm/git/docs/git-gc.html).`false`No`noprune``Boolean`Do not prune any loose objects. See --no-prune option of [git-gc](http://www.kernel.org/pub/software/scm/git/docs/git-gc.html).`false`No`prune``String`Prune loose objects older than date. See --prune option of [git-gc](http://www.kernel.org/pub/software/scm/git/docs/git-gc.html).2.weeks.agoNo C.20.1 Example ``` <property name="repo.dir" value="./relative/path/to/repo" /> <resolvepath propertyName="repo.dir.resolved" file="${repo.dir}" /> <!-- Clone repository --> <gitclone repository="git://github.com/path/to/repo/repo.git" targetPath="${repo.dir.resolved}" /> <!-- Cleanup repository--> <gitgc repository="${repo.dir.resolved}" aggressive="true" prune="1.week.ago" /> ```