How to add git repo to existing git project?

If you aleady created a local git project and you want to attach remote repository to your local project follow the steps below:

# go to your current project directory
cd my-project/

# add existing remote repo
git remote add origin https://github.com/user/repo.git

# verify newly added remote url
git remote -v

# add all your changes to new repo
git add *

# commit your changes
git commit -m "added new repo changes"

# push new changes to remote repo
git push -u origin master