Posts Tagged - git

Git normalize line endings (.gitattributes)

Esto soluciona el problema con Git que a veces Gitkraken me muestra ficheros en la lista de cambios como si hubieran sido modificados, pero realmente no los tienen y genera ruido.

Añadir .gitattributes al repo con el siguiente contenido

# Normaliza texto automáticamente
* text=auto

# Markdown SIEMPRE en LF
*.md text eol=lf

# Scripts Unix
*.sh text eol=lf

# Binarios
*.png binary
*.jpg binary
*.pdf binary

ir a la carpeta del repo. Ejecutar lo siguiente.

git add --renormalize .
git status

hacer un commit con los contenidos normalizados.

Read More

Git advanced

Config

  • see config git config -l
  • modify username git config --global user.name "newName"
  • modify email git config --global user.mail "new@mail.com"

Git bisect

Is a tool to find the exact commit where a bug was introduced.

Usage

I have a file with the following content and an obvious bug

Row row row your car at the river

Read More