Pro Git

Pro Git

🎯 ¿Cansado de los anuncios?
Elimínalos ahora 🚀
$ git add hello.rb $ git commit Recorded resolution for 'hello.rb'. [master 68e16e5] Merge branch 'i18n'

Ahora podemos ver que "Recorded resolution for FILE" (Registró solución para ARCHIVO).

rerere2

Ahora, deshagamos esa unión y luego hagámosle “rebase” en la cima de nuestra rama maestra en su lugar. Podemos tener nuestra rama de vuelta usando reset como vimos en Reiniciar Desmitificado.

$ git reset --hard HEAD^ HEAD is now at ad63f15 i18n the hello

Nuestra unión no está hecha. Ahora hagámos “rebase” a la rama temática.

$ git checkout i18n-world Switched to branch 'i18n-world' $ git rebase master First, rewinding head to replay your work on top of it... Applying: i18n one word Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging hello.rb CONFLICT (content): Merge conflict in hello.rb Resolved 'hello.rb' using previous resolution. Failed to merge in the changes. Patch failed at 0001 i18n one word

Ahora, tenemos el mismo conflicto de unión que esperábamos, pero échale un vistazo a la línea "Resolved FILE using previous resolution". Si miramos el archivo, veremos que ya está resuleto, ya no hay marcas de conflicto de unión en él.

$ cat hello.rb #! /usr/bin/env ruby def hello puts 'hola mundo' end

Además, git diff te mostrará cómo fué re-resuleto automáticamente:


👉 Descargar el audiolibro GRATIS en Amazon
Reportar problema / Sugerencias
🧠 Hacer Trivia

eXTReMe Tracker