Pushing empty commits to remote

mrutyunjay picture mrutyunjay · Nov 22, 2013 · Viewed 151.6k times · Source

I have pushed one commit to remote but now I realized that the commit message is not correct. I would like to change the commit message but AFAIK it is not possible. So i decided to create empty commit with correct message:

git commit --allow-empty

Are there any disadvantages/consequences of pushing empty commits? Is there any problem I might face in future because of this empty commit??

Answer

sarjit07 picture sarjit07 · May 14, 2020
 $ git commit --allow-empty -m "Trigger Build"