GitHub
GitHub
Section titled “GitHub”Clonar un repositorio
Section titled “Clonar un repositorio”Código
Section titled “Código”git clone https://github.com/usuario/repositorio.gitObservaciones
Section titled “Observaciones”Crea una copia local del repositorio remoto.
Conectar un repositorio local con GitHub
Section titled “Conectar un repositorio local con GitHub”Código
Section titled “Código”git remote add origin https://github.com/usuario/repositorio.gitObservaciones
Section titled “Observaciones”Asocia el proyecto local con un repositorio existente en GitHub.
Comprobar el repositorio remoto
Section titled “Comprobar el repositorio remoto”Código
Section titled “Código”git remote -vObservaciones
Section titled “Observaciones”Muestra los repositorios remotos asociados al proyecto.
Primer envío al repositorio
Section titled “Primer envío al repositorio”Código
Section titled “Código”git branch -M maingit push -u origin mainObservaciones
Section titled “Observaciones”Publica la rama principal y establece el seguimiento con el repositorio remoto.
Envíos posteriores
Section titled “Envíos posteriores”Código
Section titled “Código”git pushObservaciones
Section titled “Observaciones”Envía los nuevos commits al repositorio remoto.
Descargar cambios
Section titled “Descargar cambios”Código
Section titled “Código”git pullObservaciones
Section titled “Observaciones”Descarga e integra los cambios realizados en GitHub.
Flujo de trabajo habitual
Section titled “Flujo de trabajo habitual”Código
Section titled “Código”git statusgit add .git commit -m "Descripción de los cambios"git pushObservaciones
Section titled “Observaciones”Secuencia habitual para actualizar un proyecto en GitHub.