A bash prompt that includes battery level & git branch
Since the prompt is dynamic, executed after every command you enter in the shell, it's important to make it as fast as possible.
For example, reduce the number of processes executed as much as possible.

Instead of git branch + sed, there is an idiomatic way to get the name of the current branch using git rev-parse:

git rev-parse --abbrev-ref HEAD


That's one process instead of two.

And to get the battery percentage,
you could replace the awk + sed with a single awk:

awk '{ sub(",", "", $4); print $4 }'


I don't what is the output of the acpi command,
but I would try to extract from it the relevant part using the Pattern substitution feature of Bash itself.
That would eliminate all external processes, for best performance.