Comando git rm: qué hace y cómo se usa
¿Qué hace el comando git rm?
Equivale a borrar y hacer git add.
Ejemplos de git rm
$ git rm viejo.txtEquivale a borrar y hacer git add.
$ git rm --cached secreto.txtDespués, añádelo a .gitignore.
Pruébalo tú
Escribe este comando tal cual: git rm viejo.txt
Aprende más en Tecleo
En Tecleo no lees: escribes los comandos y te corregimos al momento, con explicaciones y repaso para que no se te olviden.