Git Commit
Learn about Git Commit in Git
Commit with a message
git commit -m "commit message"
or
git commit --message "commit message"
Creates a new commit with a message describing the changes made. This command creates a new commit with the changes you made to your local repository. The commit message describes the changes made in this commit.
git commit --amend
git commit --amend
is a command used to modify the most recent commit in your repository's history by updating its message, adding or removing files, or changing the commit's metadata. This allows you to correct mistakes or improve the commit's description after it has been made. When using --amend, Git will replace the existing commit with a new one that includes any changes made since the last commit, effectively "amending" the previous commit.
git commit --amend