Another solution to this situation is to squash your changes in place so that your branch is just 1 commit, and then do the rebase against your master branch or equivalent.
Works great if you’re willing to lose the commit history on your branch, which obviously isn’t always the case.
I had a similar situation where a fence of this style was placed directly next to a bike path. At walking height, it would have been hard to land on, but on a bike at speed? It would have been way too easy to be impaled, and it was terrifying.