我知道应该为每个逻辑更改提供Git提交,但第一次提交的约定是什么(如果存在)?
[注意:我不是就这个问题征求意见/讨论 - 如果没有共同的约定那就好了].
例如,我从头开始使用index.html创建一个网站 - 我的第一个"逻辑更改"提交可以是添加<head>
元素,添加HTML结构或添加基本内容和CSS.或者第一次提交应该是第一个"工作"版本?
编辑:我不是指提交消息; 我的意思是文件的内容.
lmi*_*asf 10
As others have reported, I haven't found a standard convention, so next I will share what I usually do.
After creating the repo, I create an empty commit which message is Initial empty commit. You have to pass the option --allow-empty
. Otherwise, you will get a message saying nothing to commit.
$ git init # creates repository
$ git commit --allow-empty -m'Initial empty commit' # creates empty commit
Run Code Online (Sandbox Code Playgroud)
I like to do it this way because it makes me think of this commit as the empty root of my repository. Besides, I can immediately push this repository without any content. After this commit I usually add the README.md.