Package kth.soffgrupp.se
Class GitHandler
java.lang.Object
kth.soffgrupp.se.GitHandler
class GitHandler extends Object
The purpose of this class is to function as a Git interface to be able to clone and checkout a repo
-
Field Summary
-
Constructor Summary
Constructors Constructor Description GitHandler(String dir)Creates a new GitHandler instance -
Method Summary
-
Field Details
-
directory
-
-
Constructor Details
-
GitHandler
Creates a new GitHandler instance- Parameters:
dir- The directory to clone the repository to
-
-
Method Details
-
checkout
public void checkout(String repo, String branch) throws org.eclipse.jgit.api.errors.GitAPIExceptionCheckout a certain branch on a repo- Parameters:
repo- the repository URLbranch- the branch name- Throws:
org.eclipse.jgit.api.errors.GitAPIException
-
clean
public void clean()Do some clean up of the directory
-