Home  >  Article  >  Development Tools  >  What does commit-m mean in git?

What does commit-m mean in git?

WBOY
WBOYOriginal
2022-01-07 10:55:3620295browse

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.

What does commit-m mean in git?

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 :

What does commit-m mean in git?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn