The "official" git prompt[1] is safe on Bash; the script doesn't run.
[1]: https://github.com/git/git/blob/master/contrib/completion/gi...
[1]: https://github.com/git/git/blob/master/contrib/completion/gi...
[1]: https://github.com/git/git/blob/9d77b0405ce6b471cb5ce3a90436...
https://github.com/git/git/commit/8976500cbbb13270398d3b3e07...