Fix check if git commit is needed