When you do "git diff" it should be showing something to the effect of "old mode," that's what you should try to use for chmod. Check git diff before and after, and aim to make git diff not say anything.
I don't know what's responsible for this but it seems like it may be specific to Juno somehow?
