.git still being included despite exclude

I have the following in my serverless.yml

# you can add packaging information here
package:
  exclude:
    - "test/*"
    - ".git/*"

I have also tried .git, “.git”, “.git/”, etc.

I can’t seem to make it such that the .git is excluded, but the test folder is successfully being excluded.
Is this a known problem?
How do I fix it?
The .git is around 90% of my .zip file right now.

Thanks,
Calem

ha! got it to work.
it’s gnarly though.

i added the following

    - ".git"
    - ".git/*"
    - ".git/*/*"
    - ".git/*/*/*"
    - ".git/*/*/*/*"
    - ".git/*/*/*/*/*"

and the exclude worked as i hoped it would.
however, this is arguably a suboptimal workaround.
has nobody encountered this before?

@calben try .git/**. When you use /* it excludes the top level files only, /** excludes files and subfolders.

FWIW this was added/fixed to work by default with https://github.com/serverless/serverless/pull/2617