How does git create empty commit
Git690
description
When using git to manage code, every time you submit code, you need to change the file to submit. Sometimes when we need to trigger some operations by submitting, we can also try to create an empty submission to achieve this purpose.
command
git commit --allow-empty -m "trigger deployment"
parameter
git : is a free and open source distributed version control system commit : record changes to the repository --allow-empty : It is generally an error to log commits that have the exact same tree as their only parent commit, and this command prevents you from making such commits. This option bypasses security and is primarily used by external SCM interface scripts. -m <msg>,--message=<msg> : Use the given <msg> as the commit message. If multiple -m options are given, their values will be concatenated into separate paragraphs. git : is a free and open source distributed version control system commit : record changes to the repository --allow-empty : It is generally an error to log commits that have the exact same tree as their only parent commit, and this command prevents you from making such commits. This option bypasses security and is primarily used by external SCM interface scripts. -m <msg>,--message=<msg> : Use the given <msg> as the commit message. If multiple -m options are given, their values will be concatenated into separate paragraphs.
result
[master b3969fb] trigger deployment