git add .
git commit -m "xxxx"
这样提交,但是会导致所有的文件备注信息都是这一段,提交的文件很多的时候,如何先单独添加注释再提交。
怪我咯2017-04-27 09:05:37
You can add/commit separately and then push together at the end.
If there are two files A.md and B.md that need to be pushed, you can do the following:
git add A.md
git commit -m "add A"
git add B.md
git commit -m "add B"
git push.....
大家讲道理2017-04-27 09:05:37
Based on the needs of the masturbator, I will give you two options:
The first option is to submit each modification to a file.
The second option is not to add the -m parameter when committing, and then the default editor (such as vim) will be called to fill in the commit message. Here, you can write as much as you want.
I understand the needs of the masturbator, but this is actually not very necessary. Generally speaking, each submission fixes a bug or adds a new feature. It is usually one file or several associated files. This is my submission granularity. It is limited to one issue. Submission remarks The information should simply state what changes were made. There is no need to explain the changes in each file in detail - everyone will see where the code has been changed.