git: fusion varios repos en 1 conservando historia
- creamos nuevo repo + primer commit (no
remotenecesario en este momento para este repo) - añadimos el remote del primer repo que queremos fusionar:
git remote add -f first_repo `link_to_first_repo` git merge --allow-unrelated-histories first_repo/master
-fhace que haga un fetch inmediatamente (With -f option, git fetch <name> is run immediately after the remote information is set up.)–allow-unrelated-historiespermite saltarse la restricción fatal: refusing to merge unrelated histories
- separar en carpetas si necesario, corregir conflictos
git merge --continue
- repetimos para otros repositorios que queramos fusionar