![](/img/trans.png)
[英]How to skip binary files when obtaining list of diff entries from commit in JGit?
[英]How to archive diff files between two commit with jgit?
我正在嘗試在分支的兩次提交之間創建一個存檔,但是不知道。
這是我的代碼:
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這個命令?
感謝您的每一個答復!
您不能使用Git或JGit存檔差異文件。 歸檔總是從樹中創建。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.