🔀Commit
Also known as Git Commit
A saved snapshot of your project, with a note saying what changed.
Think of it like
Think of it like a save point in a game. If things go wrong, you can start again from there.
Example
Jack finishes the home page and commits it with the note Add home page. Weeks later he can still see exactly that version.
Why it matters
Commits are the steps of a project's history. Good ones make bugs easy to trace and undo.
Definition
Example code
console
$ git commit -m "Add home page"
[main (root-commit) 93eadff] Add home page
1 file changed, 1 insertion(+)Common mistake
Key takeaways
- 1A snapshot. The project as it was, saved.
- 2A clear message. Say what changed and why.
- 3Local until pushed. Others see it only after a push.