What is the convention for the content of an initial/first git commit?

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

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.


Usually the first commit is named "Initial commit".

As best practice its include a README file describing the project.
The README is usually is a md file.

Just for fun read this: Funny initial git commit messages:


It seems there is no established convention then (for the content; not the message).

I found this article about best practice useful: https://sethrobertson.github.io/GitBestPractices/

Tags:

Git