Preguntas frecuentes en GIT
¿Cómo guardar la contraseña en caché?
Podemos usar el comando git config credential.helper
$ git config credential.helper cache
$ git config --global credential.helper cache
por defecto se guarda 15 minutos, pero podemos especificar el tiempo que necesitemos.
Por ejemplo para 1 hora hacemos lo siguiente:
$ git config credential.helper 'cache --timeout=3600'
$ git config --global credential.helper 'cache --timeout=3600'
Para 24 horas:
$ git config credential.helper 'cache --timeout=86400'
$ git config --global credential.helper 'cache --timeout=86400'
[201]
¿Cómo quitar los archivos ipynb_checkpoints de Jupyter Notebook?
Agregando la siguiente línea a nuestro archivo .gitignore
**/*.ipynb_checkpoints/
[202]
¿Cómo deshacer un cambio en una variable global?
Se usa el parámetro unset de la siguiente manera:
$ git config --unset credential.helper
o de manera global
$ git config --global --unset credential.helper
[203]
¿Cómo conectarse con una clave específica mediante ssh?
git clone git@bitbucket.org:usuario/repositorio.git
[204]
¿Cómo configurar una clave ssh?
[205]
¿Cómo manejar submodulos en git?
[206]
¿Cómo comentar un commit?
[207,208]
¿Cómo borrar el último commit?
git reset --soft HEAD~1
git reset --hard HEAD~1
[209]
¿Cómo comparar dos commits?
Si queremos ver las diferencias de los archivos en commits distintos, podemos usar:
git diff <commit>
por ejemplo si el hace dos commit se tenia e2c361bf029d2d6562737fd43e2e9f437022841e
git diff e2c361bf029d2d6562737fd43e2e9f437022841e
[210]
¿Cómo ejecutar nuestro propio servidor Git?
Algunos tutoriales
También te puede interesar:
- Comandos útiles
- Configuración Inicial
- Preguntas frecuentes
Referencias
- 201 Guardar en caché tu contraseña de GitHub en Git - Ayuda de GitHub
- 202 commit - How to git ignore ipython notebook checkpoints anywhere in repository - Stack Overflow
- 203 How can I remove an entry in global configuration with git config? - Stack Overflow
- 204 Specifying SSH Key within Git Clone · GitHub
- 205 Set up an SSH key - Atlassian Documentation
- 206 Git - Submódulos
- 207 semantic-release/semantic-release: Fully automated version management and package publishing
- 208 Conventional Commits
- 209 Borrar último commit con reset y revert en git | Solucionex
- 210 git - ¿Cómo ver las diferencias de un archivo con un commit específico? - Stack Overflow en español