SyntaxStudy
Sign Up
Home Git Reference git commit

git commit

command

Records staged changes to the repository with a descriptive message.

Syntax

git commit -m "message"

Example

bash
git commit -m "Add login page"

# Stage all tracked files and commit
git commit -am "Fix typo in README"

# Open editor for detailed message
git commit

# Amend the last commit
git commit --amend -m "Better message"