Create a new folder and navigate to it.
mkdir <folder-name>
cd <folder-name>
Initialize a new git repository.
git init
Create a new file and add some content to it.
vi <file-name>.txt
Enter content into the file and exit by pressing esc and type :wq.
Add the file to the staging area.
git add <file-name>.txt
Commit the changes.
git commit -m "Initial commit"