Handle an event from VCS (Git)


I am currently developing IntelliJ plugin. Want to know, is it possible to handle changes in VCS? I want to be notified with some kind of event, when commit or push happens and handle it.
If there is something like com.intellij.codeInsight.editorActions.TypedHandlerDelegate but for VCS changes, it would be really a charm. 


As nobody responded yet, I will post my own searching results on this question.

There is CheckinHandler.checkinSuccessful() method, and it seems to be suitable for this case.

But I found this in question asked back in 2008. So if something better now exists, please, write about it.




Hello Sergey,

If the intension is to extend UI actions like "on successful commit and on failed commit" then you can use 


You can register your own implementation of 


in the corresponding extension point e.g:

<extensions defaultExtensionNs="com.intellij">
<vcsCheckinHandlerFactory implementation="com.myplugin.MyCustomCheckinHandlerFactory"/>

Best Regards,
        Dmitry Zhuravlev


Thank you a lot!
And maybe you can help me with getting set of changes after commit? I mean, I wonder is it possible to get something like numbers of changed lines in file? e.g. line 25 was added, line 14 was modified, line 26 was removed and etc.



Please sign in to leave a comment.