发布包:1 个签入文件被 `.gitignore` 忽略

问题描述 投票:0回答:2

我正在尝试发布一个新包,这是

pubspeck.yaml
的内容。这是一个非常简单的包,基本上有一些帮助函数,但我收到了这个错误,我不知道为什么。我用的是macOS。

您还可以在此处查看完整代码:https://github.com/marcobraghim/suitup

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

当我运行

flutter pub publish --dry-run
时,我收到以下错误消息。不,我根本没有忽略它。

它已经发布在 https://pub.dev/packages/suitup 但错误仍然存在

* 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

PS: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
flutter dart
2个回答
0
投票

从 Git 跟踪中删除文件,同时将其保留在本地

git rm --cached .fvm/flutter_sdk

提交更改

git commit -m“从 Git 跟踪中删除 .fvm/flutter_sdk”

这些命令似乎解决了类似的问题,对我来说这是 fvm 文件,我刚刚删除并提交了问题目录和文件


-1
投票

这个问题是由于git仓库过期造成的。 "linux/flutter/ephemeral/.plugin_symlinks/path_provider_linux" 这个文件路径存在于 github 存储库中,但不存在于包中

© www.soinside.com 2019 - 2024. All rights reserved.