ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# C.14 GitArchiveTask Create an archive of files from a named tree. Table C.15:聽Attributes NameTypeDescriptionDefaultRequired`gitPath``String`Path to Git binary/usr/bin/gitNo`repository``String`The repository.n/aOne of these attributes is required.`remoterepo``String`The remote repository.n/a`treeish``String`The tree or commit to produce an archive for.n/aYes`output``String`Write the archive to file.n/aNo`prefix``String`Prepend prefix to each filename in the archive.n/aNo`format``String`Format of the resulting archive: tar or zip. If this option is not given, and the output file is specified, the format is inferred from the filename if possible (e.g. writing to "foo.zip" makes the output to be in the zip format). Otherwise the output format is tarn/aNo C.14.1 Example ``` <gitclone gitPath="${git-path}" singleBranch="true" repository="${repo.dir.resolved}" targetPath="${tmp.dir.resolved}/test" /> <gitarchive gitPath="${git-path}" repository="${tmp.dir.resolved}/test" treeish="HEAD" format="zip" output="${tmp.dir.resolved}/output.zip" /> ```