Files
30-seconds-of-code/snippets/create-commit.md
Isabelle Viktoria Maciohsek 2c0ba554cd Add commit variants
2021-04-04 20:55:26 +03:00

20 lines
373 B
Markdown

---
title: Create a commit
tags: commit,beginner
---
Creates a new commit containing the staged changes.
- Use `git commit -m <message>` to create a new commit with the specified `<message>`.
```sh
git commit -m <message>
```
```sh
# Make some changes to files
git add .
git commit -m "Fix the network bug"
# Creates a commit with the message "Fix the network bug"
```