Creamos un nuevo repositorio en https://github.com. Le damos nombre, descripción, seleccionamos si va a ser un proyecto publico o privado si es el caso, y dejamos el check de crear README sin marcar. Le damos a crear repositorio y con esto ya tenemos el repositorio donde alojaremos nuestro proyecto.
Nos vamos a la carpeta del proyecto y ejecutamos estos comandos.
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/NOMBRE_USUARIO/NOMBRE_PROYECTO.git
git push -u origin master
PSo 04> git push -u origin master
To https://github.com/xxxxxx(nombre de usuario)
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/xxxxxx.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.