You can register listeners through JGit for all repositories or individual repositories through the following methods:
Global listeners notified for all repositories:
org.eclipse.jgit.lib.Repository.getGlobalListenerList().addIndexChangedListener
org.eclipse.jgit.lib.Repository.getGlobalListenerList().addConfigChangedListener
org.eclipse.jgit.lib.Repository.getGlobalListenerList().addRefsChangedListener
Listeners on an invidiual repository:
org.eclipse.jgit.lib.Repository.getListenerList().addIndexChangedListener
org.eclipse.jgit.lib.Repository.getListenerList().addConfigChangedListener
org.eclipse.jgit.lib.Repository.getListenerList().addRefsChangedListener
These listeners support events for changes to the index, changes to the repository configuration, and changes to the repository's references (branches, tags, etc.).
You can find all the repositories registered in EGit through the following:
Get the absolute paths to all the repositories present in EGit by calling:
org.eclipse.egit.core.Activator.getDefault().getRepositoryUtil().getConfiguredRepositories()
You can get a handle to a specific Repository object by creating a File for a path returned from the previous method and then call the following with that File:
org.eclipse.egit.core.Activator.getDefault().getRepositoryCache().lookupRepository