public void remove(String filePattern) {
RmCommand remove = git.rm();
DirCache cache;
try {
cache = remove.addFilepattern(filePattern).call();
updateCache(cache);
} catch (NoFilepatternException e) {
throw new IllegalStateException("Unable to remove file from the Git cache", e);
} catch (IOException e) {
throw new IllegalStateException("Unable to remove file from the Git cache", e);