From: Matthieu Moy Date: Wed, 14 Jan 2015 10:00:55 GMT Subject: Re: How to prevent empty git commit --amend Message-ID: In-Reply-To: Ivo Anjo writes: > Is there a way to prevent a *git commit --amend** with nothing to > commit from working? > If not, I would like to suggest that this feature would be very helpful :) I don't know any way to let Git do the check for you, but git diff --staged --quiet || git commit --amend should do it. You can alias it like [alias] amend = !git diff --staged --quiet || git commit --amend and then use "git amend". -- Matthieu Moy http://www-verimag.imag.fr/~moy/