handling git commit failures gracefully