You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter包发布时提示.gitignore忽略已提交文件的问题求助

Flutter包发布时提示.gitignore忽略已提交文件的问题求助

各位大佬好,我最近在发布自己的Flutter工具包时遇到了一个搞不懂的问题,想请教下大家!

我这个叫suitup的包就是个简单的工具类集合,已经在pub.dev上发布过版本了,但最近运行flutter pub publish --dry-run做预检查的时候,一直弹出下面这个错误:

1 checked-in file is ignored by a .gitignore.
Previous versions of Pub would include those in the published package.
Consider adjusting your .gitignore files to not ignore those files, and if you do not wish to
publish these files use .pubignore. See also dart.dev/go/pubignore

Files that are checked in while gitignored:
linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux

重点是我完全没有设置忽略这个文件啊!

下面是我的pubspec.yaml内容:

name: suitup

description: A bunch of features and stuff to help me create awesome apps

version: 1.0.1

repository: https://github.com/marcobraghim/suitup

environment:
  sdk: '>=2.19.2 <3.0.0'
  flutter: ">=1.17.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_easyloading: ^3.0.5
  get_it: ^7.2.0
  google_fonts: ^4.0.3

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0

我的运行环境是MacOS,Flutter版本信息如下:

Flutter 3.7.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2ad6cd72c0 (2 weeks ago) • 2023-03-08 09:41:59 -0800
Engine • revision 1837b5be5f
Tools • Dart 2.19.4 • DevTools 2.20.1

有没有大佬知道这是怎么回事?该怎么解决这个问题呀?

备注:内容来源于stack exchange,提问作者Marco A. Braghim

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 10:49:07