← Back to category

Getting Started

How to Make Your First Git Commit in a Project

A commit is a change record you can return to. In the terminal at editor.clincoo.buzz three commands are enough for a useful first commit.

See what changed

Run git status. Red files are untracked or not staged. Do not commit node_modules, .env files, or editor backups. If they appear, add their names to .gitignore and run git status again.

Choose what goes in

git add index.html style.css stages specific files. git add . stages everything that is not ignored. git status should then list those files in green. If something was staged by mistake, git restore --staged filename removes it from the commit without deleting the file.

Write a message that explains

git commit -m "add hero and about-page link" is more useful than "update". One commit, one intent. If git refuses because identity is empty, set user.name and user.email for this repo only, then commit again.

After the commit, git log --oneline shows the history. Deploy still uses the deploy button in app.clincoo.buzz, not the commit itself.