Creating a commit is a two-step process:
# Step 1: Stage the changes you want to include
git add hello.txt # stage one file
git add . # stage everything in the current directory
# Step 2: Save the staged changes as a commit
git commit -m "Add hello.txt"
The -m flag lets you write the commit message inline. Without it, Git opens a text editor.
git config)git log # shows all commits
git log --oneline # compact: one commit per line
# abc1234 Add hello.txt
Two files have been created for you. Stage both files and create a commit with the message "Initial commit".
Click "Run" to execute your code.