#create a new repository:
git init
echo "# MESSAGE" >> README.md
git add README.md
git commit -m "first commit"
#set upstream url
git remote add origin git@github.com:User/UserRepo.git #first time
git remote set-url origin git@github.com:User/UserRepo.git # change existing to new
#At the end I perform push:
git push -u origin master