Ya estoy inscrito ¿Todavía no tienes acceso? Nuestros Planes
Ya estoy inscrito ¿Todavía no tienes acceso? Nuestros Planes
1
respuesta

Esto es actualmente lo que hice en la última clase

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2
$ git init
Initialized empty Git repository in C:/Users/patri/Documents/GitHub/Sistema-de-registro-2/.git/

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2 (master)
$

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2 (master)
$ git status
On branch master

No commits yet

Untracked files:
(use "git add ..." to include in what will be committed)
index.html

nothing added to commit but untracked files present (use "git add" to track)

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2 (master)
$ git add .

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2 (master)
$ git commit -m "este es mi archivo index"
[master (root-commit) 7ecf75d] este es mi archivo index
1 file changed, 11 insertions(+)
create mode 100644 index.html

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2 (master)
$ git remote add origin https://github.com/carltofen1/Sistema-de-registro-2.git

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2 (master)
$ git remote -v
origin https://github.com/carltofen1/Sistema-de-registro-2.git (fetch)
origin https://github.com/carltofen1/Sistema-de-registro-2.git (push)

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2 (master)
$ git branch -M main

patri@carltofen MINGW64 ~/Documents/GitHub/Sistema-de-registro-2 (main)
$ git push -u origin main
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 373 bytes | 186.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/carltofen1/Sistema-de-registro-2.git

  • [new branch] main -> main
    branch 'main' set up to track 'origin/main'.
1 respuesta

¡Hola Patrick!

¡Parece que has seguido correctamente los pasos para inicializar un repositorio de Git, agregar un archivo, hacer un commit y luego subirlo a GitHub! Todo lo que hiciste se ve muy bien y es exactamente lo que se suele hacer para comenzar a trabajar con Git y GitHub.

Para resumir lo que hiciste:

  1. Inicializaste un repositorio de Git en tu directorio local.
  2. Verificaste el estado del repositorio y viste que tenías un archivo no rastreado (index.html).
  3. Agregaste el archivo a la zona de preparación con git add ..
  4. Hiciste un commit con un mensaje descriptivo.
  5. Configuraste un repositorio remoto en GitHub.
  6. Cambiaste el nombre de la rama principal de master a main.
  7. Finalmente, empujaste tus cambios al repositorio remoto en GitHub.

Todo parece estar en orden. Si este era el objetivo de la actividad, ¡felicitaciones por completar los pasos correctamente!

Espero haber ayudado y buenos estudios!

Si este post te ayudó, por favor, marca como solucionado ✓. Continúa con tus estudios!