You have two options:
A) Remove the git files after they are uploaded:
gsutil rm gs://bucket/\*.git\*
B) Use find to exclude git files:
find . -not -path '*/.git' -type f -printf '%P\n' | xargs -I '{}' gsutil cp '{}' gs://bucket/'{}'
Source: https://groups.google.com/forum/#!topic/gsutil-discuss/zoHhkTPhiNc
It would've been much easier if gsutil implemented rsync, this would've been easier with their --exclude flag.