Shilpa
Published in : 2022-03-02
I am making code changes, where my development work is still ongoing, I want to push some files without adding a comment for those comment history.
Is it possible to commit a file excluding the message for the commit? Any other suggestions are also most welcomed to achieve this requirement!
Join our community and get the chance to solve your code issues & share your opinion with us
Sign up Now
Eslam Zedan Date : 2022-03-02
Best answers
8
Best answers
8
you can commit with an empty comment but it is not a good practice you should comment your commit so you can know why you made these changes
here is the code for the empty commit
Rakshit Date : 2022-03-05
Best answers
34
Best answers
34
If you are not destroyer and want to do the things for good purpose, here is what you can use
in your git commit command,
add parameter “--allow-empty” : No file changes
add parameter “--allow-empty-message”: Empty commit messages
Syntax:
Try below command to achieve your task,
Reference: the online documentation.