Git trigger

@smathieu could you review this please?
whenever calling external commend, you should always check for the return code.