private void initClonedRepository ( ) throws GitAPIException , IOException { if ( ! getUri ( ) . startsWith ( FILE_URI_PREFIX ) ) { deleteBaseDirIfExists ( ) ; Git git = cloneToBasedir ( ) ; if ( git != null ) { git . close ( ) ; } git = openGitRepository ( ) ; if ( git != null ) { git . close ( ) ; } } }
Clones the remote repository and then opens a connection to it .