Skip to content

First Commit

First, run this code that initializes a new git repo inside a directory named yolo/.

mkdir yolo
cd yolo
git init 

Don't forget to cd to the parent directory where you want the yolo/ directory to reside, before running the above code.

Now insert a text file named foo.txt inside yolo/.

Finally, commit your changes with the message "first commit".

How do I create a text file from the command line?

Create an empty file using touch

touch foo.txt

Create a file with some text using echo

echo "Hello World" > foo.txt

See the solution