Wpis z mikrobloga

Mam problem z git.
1. Miesiąc temu wprowadziłem zmiany na branch A
2. przez pomyłkę zmergowalem je z Masterem.
3. Zrobiłem wtedy na masterze undo merge.
4. Dzisiaj skończyłem prace na branchu A i chce wrzucić te wszystkie swoje zmiany na główną gałąź.
5. Robię merge na mastera
6. Na masterze są zmiany tylko z ostatniego miesiąca a nie ma tych sprzed undo merge zrobionego miesiąc temu.
Chce mieć wszystkie zmiany ze swojego brancha A ale nie chce nadpisać całych plików żeby nie usunac zmian kolegów.

#git #programowanie
  • 11
@mvvpe: Ehh… niestety łatwiej było zrobic Revert kroku 3… i później merge.
Jak próbowałem rebase i merge w różnych kolejnosciach, to wszystko się mieszało i było cześć zmian z jednego i cześć z drugiego brancha. Mam tylko nadzieje ze teraz mam wszystkie potrzebne zmiany :(
@DaxterPoker: Rozwiązanie od samego Linusa: howto/revert-a-faulty-merge.txt

Reverting a regular commit just effectively undoes what that commit

did, and is fairly straightforward. But reverting a merge commit also
undoes the data that the commit changed, but it does absolutely
nothing to the effects on history that the merge had.

So the merge will still exist, and it will still be seen as joining
the two branches together, and future merges will see