Use the following command to initialize the repository
> git init
Use the following command to index repository
> git add .
Use the following command to commit into repository
> git commit -m "Add existing project files to Git"
Use the following command to connect to the existing repository
> git remote add origin https://github.com/username/repository-name.git
Use the following command to push the local directory into repository
> git push -u -f origin master