Creating Git Repository From Directory With Files

In order to create a new repository from a folder that already has files in it you can run the following commands:

cd local_dir
git init
git add .
git commit -m ‘message’
git remote add origin url
git push -u origin master