Run git command synchronously (Fix #453)