Commit#

After staging a file, we can commit it.

A commit is a snapshot of the repository at a given point in time. It’s a way to save the state of the repository, and it’s how Git keeps track of changes to the project. A commit comes with a message that describes the changes made in the commit.

Here’s how to commit all of your staged files:

git commit -m "your message here"

Change the last commit message#

git commit --amend -m "A: add contents.md"