Create an empty directory
$ mkdir my-local-repo
Convert the local empty directory to git local repo Change to created directory
~/my-local-repo$ git init Initialized empty Git repository in /home/ubuntu/my-local-repo/.git/
The above command will create .git folder that has meta data
~/my-local-repo$ ls -a . .. .git
Add file named Hello.txt
~/my-local-repo$ echo "Hello Wrold!!" > Hello.txt echo "Hello Wroldls" > Hello.txt