I’ve been using Stacked Pull-Requests to guide my team members through a feature development.
However, meanwhile some other developer merged his changes in develop so I had to rebase.
This was before rebase:
F3.1
/
F2.1-F2.2-F2.3
/
F1.1
/
DEV_1-DEV_2
My feature had three branches, F1, F2 and F3. My collegue pushed DEV_2. I wanted this:
F3.1
/
F2.1-F2.2-F2.3
/
F1.1
/
DEV_1-DEV_2
But after running
$ git checkout F3.1
$ git rebase --update-refs develop
I diverged, so I used
$ git push --force
from F3.1
And now I have
F2.1-F2.2-F2.3
/
F1.1 F1.1-F2.1-F2.2-F2.3-F3.1
/ /
DEV_1-DEV_2
I already reset it to previous structure, so that’s not the problem. But it seems like I misunderstood –update-refs. I thought it would take care of exactly that by updating every ref from other branches?!
Bing Bang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.