public static GitVersion parse(String versionFromConsoleOutput) {
        String[] lines = versionFromConsoleOutput.split("\n");
        String firstLine = lines[0];
        Matcher m = GIT_VERSION_PATTERN.matcher(firstLine);
        if (m.find()) {
            try {
                return new GitVersion(parseVersion(m));
            } catch (Exception e) {
                throw bomb("cannot parse git version : " + versionFromConsoleOutput);
            }
        }
        throw bomb("cannot parse git version : " + versionFromConsoleOutput);
    }
@Test
    public void shouldThowExceptionWhenGitVersionCannotBeParsed() {
        String invalidGitVersion = "git version ga5ed0asdasd.ga5ed0";
        assertThatExceptionOfType(RuntimeException.class)
                .isThrownBy(() -> GitVersion.parse(invalidGitVersion))
                .withMessage("cannot parse git version : " + invalidGitVersion);
    }