Do not execute git commit --amend when there is no file changed in the index

Avoid to change the hash value of the commit accidentally by gecomend.