top | item 46159763

(no title)

nopurpose | 2 months ago

That particular case can be solved much easier by rebasing outer-most branch with `--update-refs` flag.

discuss

order

happytoexplain|2 months ago

I came into the comments specifically to ask if this flag existed. I feel bad that the author developed this whole flow just because they didn't know about this, but that's pretty common with git.

fwip|2 months ago

I'm pretty sure the author was Claude, so don't feel too bad for it.

onionisafruit|2 months ago

Thanks. This is going to be so useful, but it pains me to know I could have been using —update-refs for the last three years.

I used to dutifully read release notes for every git release, but stopped at some point. Apparently that point was more than three years ago.

nopurpose|2 months ago

discoverability is a big problem, especially for CLI tools which can't afford to show small hints or "what's new" popups. I myself learned it from someone else, not docs.

ananthakumaran|2 months ago

Exactly, I was reading the blog and wondering the whole time how it's better than --update-refs, which I have been using a lot recently.

imron|2 months ago

Yep. I set this in .gitconfig

duskdozer|2 months ago

I'm guilty lol. I wrote a helper to do rebase chains like this

nopurpose|2 months ago

update-refs works only in a narrow case when every branch starts form the tip of a previous. Your helper might still be useful if it properly "replants" whole tree keeping its structure.