Skip to content

Git, GitLab & Issues

GitLab con Redmine para los issues

Ver: https://www.redmine.org/projects/redmine/wiki/howto_install_redmine_on_ubuntu_step_by_step

Hay un docker que se puede usar facil via docker-compose, ver: https://hub.docker.com/_/redmine

git

The Git inferno (?) en git.wtf.

También en: ohshitgit.com

ssh push/pull

  1. Generar una clave SSH piola: https://wiki.archlinux.org/index.php/SSH_keys#Ed25519
  2. Agregarla al ssh-agent: ver tutorial
  3. Agregar su public key a tu GitHub: https://github.com/settings/keys
  4. Correr algo como: git remote set-url origin git@github.com:TU_USUARIO/TU_REPOSITORIO.git

Ahora deberia poderse pushear sin usuario/pass normal, usando solamente la llave ssh y su passphrase.

git diff

Con colores: git diff --color-words

agregar un remote (cuando el fork está deshabilitado)

git remote add origin2 https://github.com/naikymen/ML_UNSAM.git
git push --all origin2

Para actualizar la rama main del segundo remote origin2:

# Traer cambios del primer repo remoto al repo local
git pull origin main
# Aplicar cambios en el segundo repo remoto
git push origin2 main

Submodules

https://tstavropoulos.github.io/blargs/git_submodules.html

git credentials in KDEwallet

https://wiki.archlinux.org/index.php/KDE_Wallet#Using_the_KDE_Wallet_to_store_Git_credentials

Git Cola - git GUI

Remote X11 forwarding desktop file

[Desktop Entry]
Categories=Development;RevisionControl;
Comment[en_US]=The highly caffeinated Git GUI
Comment=The highly caffeinated Git GUI
Exec=ssh -X pi@192.168.0.666 "git-cola"
GenericName[en_US]=Git Cola on RPi4 X11 forwarding to local picola
GenericName=Git Cola on RPi4 X11 forwarding to local picola
Icon=git-cola
MimeType=
Name[en_US]=Pi Cola
Name=Pi Cola
Path=
StartupNotify=true
Terminal=true
TerminalOptions=
TryExec=git-cola
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=none
X-KDE-SubstituteUID=false
X-KDE-Username=

Limpiar el historial por extensión de archivos

Ver: https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github#removing-files-from-a-repositorys-history

Errores

GH007

error: "GH007: Your push would publish a private email address"

No usa la llave ssh

Esto me paso porque kssaskpass empezó a fallar, porque github ya no permite autenticacion por contraseña.

Desinstalar ksshaskpass no alcanzo, tampoco los "unset" en .bashrc o .zshrc.

Funcionó esto: https://stackoverflow.com/questions/9960897/why-doesnt-my-ssh-key-work-for-connecting-to-github

Hay una forma de usar llaves ssh con ksshaskpass y git/github, pero preferi quitarlo del medio.

tags renombrados

Los tags se pueden renombrar: https://stackoverflow.com/a/5719854/11524079

Pero quizás aparezcan estos problemas:

  $ git describe
  warning: tag '1.0' is really '1.5' here

  $ git describe
  git tag '1.0' is externally known as '1.5'

Ver solución en: https://stackoverflow.com/a/25672982/11524079

Error al pushear: closed by remote host

Este error tiene que ver con pushear mucho contenido.

Connection to gitlab.com closed by remote host.
fatal: the remote end hung up unexpectedly

Ver: https://gitlab.com/gitlab-com/gl-infra/production-engineering/-/issues/12016#note_509230506

Solucion de ese thread, agregar lo siguiente a .git/config:

[pack]
    threads = 12