DEV Community

Discussion on: The Magic of Empty Git Commit

 
remejuan profile image
Reme Le Hane • Edited

Yeah, I have shortcuts for basically everything, and I would rather leave the code than add literal junk into my commit history.

Like sure, it would make sense if there was no other way like a public repo where I have no access to the run button, but when I do, I will do it properly, which when I do, is not not push junk into my commit history.

Thread Thread
 
pradumnasaraf profile image
Pradumna Saraf

Agreed 1000% with you Ben. The only person who has worked in that environment can understand the importance.

Also, about the UI, on projects with hundreds of maintainers, don't give direct access to CI or third-party buttons/mutual triggers. Bots are used to merge the PRs and empty commit is the only way to re-run those.

Thread Thread
 
giuliano1993 profile image
Giuliano1993

I agree with Ben too! It actually happens to add a space just to be able to create a new commit and re-run certain processe that are not necessarely easy to get started in different ways.
I still wouldn't abuse empty commits, but they appear to be further more useful of what they seemed at first sight

Some comments have been hidden by the post's author - find out more