Fix git buttons

#2452 

@ussuri PTAL thanks.
@ussuri  The commitButton disable is not working here. However, it works fine later when the user commits a change. I am using the exact same code at both places. I also tried a delay before and after disabling, but still the disable event is not getting triggered here.