Is there any way to exclude certain files or directories from pub publish
for dart packages?
I am publishing a package that has so many screenshots. I want them to upload on GitHub but not on Pub.Dev
. The intention behind this is to reduce the package size.
lock file lets you test your package against the latest compatible versions of its dependencies. For application packages, we recommend that you commit the pubspec.
If you are working on an application package, then you should keep the pubspec. lock file in your repository as a snapshot of your dependencies.
You can now create a .pubignore
file to do this. See this PR for more details on how this works.
Clearing git cache from my PC works for me:
git rm -r --cached .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With