public GitAddResponse add ( File repositoryPath , GitAddOptions options , List < File > paths ) throws IOException , JavaGitException { CheckUtilities . checkFileValidity ( repositoryPath . getAbsoluteFile ( ) ) ; IClient client = ClientManager . getInstance ( ) . getPreferredClient ( ) ; IGitAdd gitAdd = client . getGitAddInstance ( ) ; return gitAdd . add ( repositoryPath , options , paths ) ; }
This command adds the current content of new or modified files to the index thus staging that content for inclusion in the next commit .