Home > Article > Development Tools > What does commit-m mean in git?
In git, "commit -m" means "submit the temporary storage area file to the local warehouse", and the syntax is "git commit -m [message]"; the commit command is used to transfer the temporary storage area to the local warehouse. The content is added to the local warehouse, and the message can be some remarks.
The operating environment of this article: Windows 10 system, Git version 2.30.0, Dell G3 computer.
What does commit-m mean in git
The git commit command adds the contents of the staging area to the local warehouse.
Submit the staging area to the local warehouse:
git commit -m [message]
[message] can be some remarks.
Submit the specified files in the temporary storage area to the warehouse area:
$ git commit [file1] [file2] ... -m [message]
-a After setting the parameters and modifying the file, you do not need to execute the git add command. Submit directly
$ git commit -a
The example is as follows :
Recommended study: "Git Tutorial"
The above is the detailed content of What does commit-m mean in git?. For more information, please follow other related articles on the PHP Chinese website!