2016-03-10 41 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")); 

谢谢

回答