2016-03-10 64 views
1

你好,我在ProcessBuilder中有回購路徑的問題。我曾經遇到過同樣的問題,但這次解決方案並不奏效。而我的錯誤看起來ProcessBuilder不接受git repo路徑

fatal: Not a git repository (or any of the parent directories): .git 

任何想法爲什麼路徑不工作?庫根

public static final String REPOSITORY_ROOT = "C:\\Workspace-git\\"; 

enter image description here

解決方案

ProcessBuilder ps= new ProcessBuilder(new String[]{"git","pull",RepositoryConstants.REPOSITORY_ROOT+"cl-testowy"}); 
     ps.directory(new File(RepositoryConstants.REPOSITORY_ROOT+"cl-testowy")); 

謝謝

回答