Skip to content

Instantly share code, notes, and snippets.

@ayozebarrera
Last active August 29, 2015 14:15
Show Gist options
  • Save ayozebarrera/2f31a82050844462351f to your computer and use it in GitHub Desktop.
Save ayozebarrera/2f31a82050844462351f to your computer and use it in GitHub Desktop.
Make a repository on github from command line
###############################################################################
# CREAR UN REPOSITORIO EN GITHUB DESDE LA TERMINAL ############################
###############################################################################
###############################################################################
# Crear el repositorio en Github (Github API v3)
curl -u '<user>' https://api.github.com/user/repos -d '{ "name": "<repository>" }'
# Añadir el repositorio remoto de Github a nuestro repositorio local
git remote add origin [email protected]:<user>/<repository>.git
# Añadimos todos los cambios
git add .
# Commit inicial
git commit -m "init"
# Enviar cambios del repositorio local a Github
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment