git create new repository from existing code example
Example: git existing code to new repository
cd myapp
git init
git remote add origin https://github.com/myname/myapp.git
git add .
git commit -m "Initial commit"
git push -u origin master
cd myapp
git init
git remote add origin https://github.com/myname/myapp.git
git add .
git commit -m "Initial commit"
git push -u origin master