Download the full zip-file from MATLAB Central File Exchange, extract somewhere on your MATLAB path and type jgit. This will download the latest version of JGit and edit your Java class path file called javaclasspath.txt located in your MATLAB preference directory, making a copy called javaclasspath.txt.JGitSaved of javaclasspath.txt if it already exists.
After this you must restart MATLAB for the changes to your MATLAB Java static class path to take effect.
Set your global gitconfig user name and email using the following:
jgit setUserInfo '<name>' <email@address.com>
You can retrieve your global gitconfig settings as well.
[name,email] = JGit.getUserInfo