diff --git a/snippets/create-commit.md b/snippets/create-commit.md new file mode 100644 index 000000000..95eaf6e91 --- /dev/null +++ b/snippets/create-commit.md @@ -0,0 +1,18 @@ +--- +title: Create a commit +tags: commit,beginner +--- + +Creates a new commit containing the staged changes. + +- Use `git commit -m ` to create a new commit with the specified ``. + +```sh +git commit -m +``` + +```sh +git add . +git commit -m "Fix the network bug" +# Creates a commit with the message "Fix the network bug" +```