Only run git commit if repository dirty