6. Control de versiones

Comparación de herramientas para control de versiones

Git

https://git-scm.com/book/en/v1/Git-on-the-Server-The-Protocols git config –global core.autocrlf input http://git-annex.branchable.com/ git cheatsheet git stash git-modules git-web

[merge]
    tool = winmerge
[mergetool "winmerge"]
    cmd = "'C:/Program Files (x86)/WinMerge/WinMergeU.exe'" -u -e "$LOCAL" "$REMOTE" "$MERGED"
[diff]
    tool = winmerge
[difftool "winmerge"]
    cmd = "'C:/Program Files (x86)/WinMerge/WinMergeU.exe'" -u -e "$LOCAL" "$REMOTE"

Para hacer squash, incluido el commit inicial (más info): git rebase -i --root master

Difference between –force and +, when rebasing

Gitosis

GitHub

NOTA: GitHub Desktop funciona con HTTPS. Hay que añadir un segundo remote para utilizar SSH, ya que si renombramos origin, la aplicación no reconoce el repositorio.

GitLab

GitLab es una alternativa a GitHub, que ofrece servicios similares y además pone el código fuente a disposición de la comunidad para que se puedan realizar instalaciones propias.

gitolite

Gogs

Git <-> SVN

git-svn

# Splitting a subfolder out into a new repository
git filter-branch --prune-empty --subdirectory-filter YOUR_FOLDER_NAME master

# Eliminar un directorio y todo el historial asociado a los ficheros que contiene
# http://stevelorek.com/how-to-shrink-a-git-repository.html
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch DIRECTORIOABORRAR' --prune-empty --tag-name-filter cat -- --all
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now

Análisis de repositorios

- [gitinspector](https://github.com/ejwa/gitinspector)
- [gource](http://gource.io/)
- [git_stats](https://github.com/tomgi/git_stats)
- [git-cal](https://github.com/k4rthik/git-cal)
- [git-stats](https://github.com/IonicaBizau/git-stats)
- [GitStats](https://github.com/hoxu/gitstats)