Is there a way to exclude files/folders from source in parts?

While building using snapcraft locally, is there a way to for the files defined in .gitignore to be excluded from source in parts?

parts:
  runner:
    plugin: nil
    source . # How to exclude files here?
4 Likes