0
使用命令行Git命令我可以做以下如何使用JGit API檢出遠程文件?
git checkout ref/origin/remotebranch projectA/*
但是如果我做了使用jgit以下,了projectA下的文件/ *未簽出。
CheckoutCommand checkout= git.checkout();
checkout.addPath("projectA/*");
checkout.setName("ref/origin/remotebranch");
checkout.setAllPaths(false);//tried with both true and false
checkout.call();
如何在JGit中解決此問題?
無法與checkout.addPath(「projectA」)一起使用 – codejammer 2012-08-11 13:53:29
您使用的是哪個版本的JGit?下面的工作與JGit大師:https://gist.github.com/3338160 – robinst 2012-08-13 08:21:34
順便說一句,是'ref/origin/remotebranch'一個錯字,或者你真的有這樣的裁判?通常這是'refs/remotes/origin/remotebranch'。 – robinst 2012-08-13 08:25:05