I know that Git commits should be made for each logical change, but what is the convention (if any exist) for the first commit?
[note: I'm not inviting opinion/discussion on this - if there isn't a common convention then fine].
For instance I've started a website from scratch with index.html - my first 'logical change' commit could be anything from adding the <head>
elements, adding the HTML structure, or adding the basic content and CSS. Or should the first commit be the first 'working' version?
Edit: I don't mean the commit message; I mean the content of the files.
For brand new projects, there typically aren't yet any code files for Git to track, since the developers haven't written any code yet! In this case, the initial commit usually contains a single file called README.md which is simply a text file describing the purpose of the project.
The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With