【发布时间】:2017-06-23 05:30:31
【问题描述】:
我正在尝试在我的分支上的两个提交之间创建一个存档,但不知道..
这是我的代码:
ArchiveCommand.registerFormat("zip", new ZipArchiveFormat());
git.archive()
.setTree(repo.resolve("refs/heads/master^{tree}"))
.setFormat("zip")
.setOutputStream(new FileOutputStream(new File("test.zip")))
.call();
我使用这样的 git 命令 git archive --output=files.tar HEAD $(git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT 809365fe 7793cf5) 如何我可以用 jGit 执行此命令吗?
感谢您的每一个回复!
【问题讨论】: