More portable handling of git branches