…or create a new repository on the command line
echo "# testgit" >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin https://github.com/jsbsan/testgit.git git push -u origin main
…or push an existing repository from the command line
git remote add origin https://github.com/jsbsan/testgit.git git branch -M main git push -u origin main
Clonar un repositorio utilizando la línea de comando
En GitHub Enterprise, visita la página principal del repositorio.
Sobre la lista de archivos, da clic en Código.
To clone the repository using HTTPS, under "Clone with HTTPS", click . To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority, click Use SSH, then click . To clone a repository using CLI de GitHub, click Use CLI de GitHub, then click .
Abre la Terminal.
Cambia el directorio de trabajo actual a la ubicación en donde quieres clonar el directorio.
Escribe
git clone
, y luego pega la URL que copiaste antes.$ git clone https://nombre de host/YOUR-USERNAME/YOUR-REPOSITORY
Presiona Enter para crear tu clon local.
$ git clone https://nombre de host/YOUR-USERNAME/YOUR-REPOSITORY > Cloning into `Spoon-Knife`... > remote: Counting objects: 10, done. > remote: Compressing objects: 100% (8/8), done. > remove: Total 10 (delta 1), reused 10 (delta 1) > Unpacking objects: 100% (10/10), done.