2021-09-06 18:12:36 -05:00
|
|
|
|
|
|
|
## Recursos Git
|
|
|
|
|
|
|
|
### Manuales
|
|
|
|
|
|
|
|
- [En inglés](https://git-scm.com/docs)
|
|
|
|
|
2021-09-07 08:12:17 -05:00
|
|
|
### Comandos
|
|
|
|
|
|
|
|
- Verificar cambios en el directorio de trabajo
|
|
|
|
``` git status ```
|
|
|
|
|
|
|
|
- Preparar los cambios para actualización
|
|
|
|
``` git add <nombre-del-archivo> ```
|
|
|
|
|
|
|
|
- Preparar los cambios en todos los archivos
|
|
|
|
``` git add . ```
|
|
|
|
|
|
|
|
- Hacer commit de todos los cambios que están en la fila
|
|
|
|
``` git commit -m "Mensaje del commit" ```
|
|
|
|
|
|
|
|
- Cargar los commits en el repositorio remoto
|
2021-09-06 18:12:36 -05:00
|
|
|
``` git push origin master ```
|
|
|
|
|
|
|
|
- Crear una rama y cambiar hacia ella
|
2021-09-26 16:12:01 -05:00
|
|
|
``` git checkout -b <nombre-de-la-nueva-rama> ```
|
2021-09-07 08:12:17 -05:00
|
|
|
|
|
|
|
- Cambiar el nombre del archivo
|
|
|
|
``` git mv <nombre-original> <nuevo-nombre> ```
|
|
|
|
|
2021-09-26 16:12:01 -05:00
|
|
|
- Añadir el repositorio local a otro remoto
|
|
|
|
``` git remote add <nombre-del-repositorio> <servidor-del-repositorio-remoto> ```
|
|
|
|
|
|
|
|
- [Cheat Sheet](https://quickref.me/git)
|
|
|
|
|
2021-09-06 18:12:36 -05:00
|
|
|
### Llaves SSH
|
|
|
|
|
|
|
|
- Verificar si existe llave:
|
|
|
|
``` ls -al ~/.ssh ```
|
|
|
|
|
|
|
|
- Crear una llave:
|
|
|
|
``` ssh-keygen -o ```
|
|
|
|
|
|
|
|
- Ver la llave:
|
|
|
|
``` cat ~/.ssh/id_rsa.pub ```
|
|
|
|
|
2021-09-07 08:12:17 -05:00
|
|
|
- Editar la URL del proyecto:
|
2021-09-06 22:40:59 -05:00
|
|
|
``` vim .git/config```
|
|
|
|
|
2021-09-06 18:12:36 -05:00
|
|
|
|
2021-09-07 08:52:32 -05:00
|
|
|
### Alternativas a Git
|
2021-09-07 08:12:17 -05:00
|
|
|
- [Mercurial](https://www.mercurial-scm.org/)
|
|
|
|
|
2021-09-07 08:52:32 -05:00
|
|
|
- [Fossil](https://fossil-scm.org/home/doc/trunk/www/index.wiki)
|
|
|
|
|
2021-09-06 18:12:36 -05:00
|
|
|
- En ese [blog](https://victorhckinthefreeworld.com/2020/11/25/fossil-la-alternativa-a-git/) hay una comparación entre Git y Fossil
|
2021-09-07 08:12:17 -05:00
|
|
|
|
2021-09-06 18:12:36 -05:00
|
|
|
### Markdown
|
|
|
|
- [Guía básico](https://www.markdownguide.org/basic-syntax/#emphasis): En inglés
|
2021-09-26 16:12:01 -05:00
|
|
|
|
|
|
|
|
|
|
|
- Markdown no tiene sintaxis propia para texto colorido. Código de CSS sirve para añadir colores:
|
|
|
|
``` <span style="color:yellow">text</span> ```
|
|
|
|
|
|
|
|
- Resultado: <span style="color:yellow">text</span>
|