Tengo una rama git (llamada v4), que se creó a partir del maestro ayer. Hubo un par de cambios en el maestro, que quiero entrar en v4. Entonces, en v4, traté de hacer una rebase desde el maestro, y un archivo sigue arruinando cosas: un archivo de texto de una línea, que contiene el número de versión. Este archivo es app/views/common/version.txt
, que antes del cambio de base contiene este texto:Git rebase: los conflictos siguen bloqueando el progreso
v1.4-alpha-02
Esto es lo que estoy haciendo:
> git rebase master
First, rewinding head to replay your work on top of it...
Applying: new version, new branch
error: patch failed: app/views/common/version.txt:1
error: app/views/common/version.txt: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging app/views/common/version.txt
CONFLICT (content): Merge conflict in app/views/common/version.txt
Failed to merge in the changes.
Patch failed at 0001 new version, new branch
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
El version.txt
ahora se ve así:
<<<<<<< HEAD:app/views/common/version.txt
v1.4-alpha-02
=======
v1.4-alpha-01
>>>>>>> new version, new branch:app/views/common/version.txt
Por lo tanto, ponerlo en orden y se ve así ahora:
v1.4-alpha-02
y luego traté de continuar: en un primer momento lo intento una confirmación:
> git commit -a -m "merged"
# Not currently on any branch.
nothing to commit (working directory clean)
no hay suerte. Por lo tanto, estaba tratando de agregar el archivo:
git add app/views/common/version.txt
Sin respuesta. No hay noticias son buenas noticias, supongo. Por lo tanto, trato de continuar:
> git rebase --continue
Applying: new version, new branch
No changes - did you forget to use 'git add'?
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
Es en este punto, después de dar vueltas y vueltas con esto, que estoy golpeando la cabeza de la mesa.
¿Qué está pasando aquí? ¿Qué estoy haciendo mal? ¿Alguien me puede aclarar?
EDITAR - para unutbu
me cambió el archivo como usted sugiere y obtener el mismo error:
> git rebase master
First, rewinding head to replay your work on top of it...
Applying: new version, new branch
error: patch failed: app/views/common/version.txt:1
error: app/views/common/version.txt: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging app/views/common/version.txt
CONFLICT (content): Merge conflict in app/views/common/version.txt
Failed to merge in the changes.
Patch failed at 0001 new version, new branch
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
gracias por hacer esta pregunta ... me estaba enfrentando exactamente el mismo problema –
estaría bien si confirmas alguna respuesta – holms
@MaxWilliams, creo que (como yo) hemos malinterpretado [@unutbu] (http: // stackoverflow. com/a/4033058/277826) 's consejos: 1) primero ejecuta 'git rebase master' _y deja que falle_; 2) luego editas 'version.txt' y lo haces como debe verse en ese punto, y guardas la edición; 3) luego 'git add .../version.txt'; 4) luego haces 'git rebase --continue' (_ ** not ** 'commit'_)! Si 'rebase --continue' tiene éxito aquí, _it ya está comprometido_ (¡no hace falta' git commit' aquí!) - así que todo lo que queda por hacer es 'git push' (si usas un repositorio remoto). Espero que esto ayude, si lo hice bien ':)' - ¡salud! – sdaau