当前位置: 首页 > news >正文

Android Studio 使用小记2 Flutter提交SVN时需要忽略哪些文件

今天上午发了一篇使用SVN的小记,在解决问题的过程中,发现不少同学在使用Android Studio进行Flutter应用开发时,对需要忽略哪些文件(不提交到SVN协同)不是很明确,对于这个问题,Flutter官方有明确的说明,可通过下面的网址进入了解:

https://dart.dev/guides/libraries/private-files 

What not to commit

When you put Dart source code in a repository—using the pub tool, GitHub, or another source code management system—don’t include most of the files that your IDE or code editor, the pub tool, and other tools generate.

info Note: Except where noted, this page discusses only source code repositories, not app deployment. Some files that you wouldn’t normally put in a repository are useful or essential when you deploy an app.

The rules

Don’t commit the following files and directories created by pub:

.dart_tool/
build/
pubspec.lock  # Except for application packages

Don’t commit the API documentation directory created by dart doc:

doc/api/

Don’t commit files and directories created by other development environments. For example, if your development environment creates any of the following files, consider putting them in a global ignore file:

# IntelliJ
*.iml
*.ipr
*.iws
.idea/# Mac
.DS_Store

For more details, read on.

Details

As a rule, commit only the files that people need to use your package or source code repository. Including additional files is unnecessary, could be counterproductive, and might have security implications if you expose details about your machine’s setup. In many source code repositories, the common practice is not to commit generated files, at all.

To avoid committing files that are specific to your personal workflow or setup, consider using a global ignore file (for example, .gitignore_global).

When you use pub from within a Git repo, pub ignores the same files that Git does. For example, if you run pub publish from a Git repo that has a .gitignore file containing keys.txt, then your published package won’t contain the keys.txt file.

For more information on .gitignore files, see the GitHub help page Ignoring files.

.dart_tool/

The .dart_tool/ directory contains files used by various Dart tools.

pubspec.lock

The pubspec.lock file is a special case, similar to Ruby’s Gemfile.lock.

For regular packagesdon’t commit the pubspec.lock file. Regenerating the pubspec.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.lock file. Versioning the pubspec.lock file ensures changes to transitive dependencies are explicit. Each time the dependencies change due to dart pub upgrade or a change in pubspec.yaml the difference will be apparent in the lock file.

http://www.lryc.cn/news/292848.html

相关文章:

  • 搜索引擎评价指标及指标间的关系
  • armbian修改docker目录到硬盘
  • cip、ethernet/ip开源协议栈:开发源代码
  • 网络原理TCP/IP(2)
  • Echars3D 饼图开发
  • 【PaddleSpeech】语音合成-男声
  • AI-数学-高中-17-三角函数的定义
  • centOS/Linux系统安全加固方案手册
  • 编程实例分享,眼镜店电脑系统软件,配件验光管理顾客信息记录查询系统软件教程
  • 完整的 HTTP 请求所经历的步骤及分布式事务解决方案
  • SpringMVC请求和响应
  • AIGC实战——深度学习 (Deep Learning, DL)
  • Django_基本增删改查
  • 数仓治理-存储资源治理
  • Linux系统安全:安全技术 和 防火墙
  • 3dmatch-toolbox详细安装教程-Ubuntu14.04
  • Hadoop与Spark横向比较【大数据扫盲】
  • 软件工程知识梳理5-实现和测试
  • WebRTC系列-自定义媒体数据加密
  • golang的sqlite驱动不使用cgo实现 更换gorm默认的SQLite驱动
  • Linux 系统 ubuntu22.04 发行版本 固定 USB 设备端口号
  • Vue - 面试题持续更新
  • Django的web框架Django Rest_Framework精讲(二)
  • VR视频编辑解决方案,全新视频内容创作方式
  • 有趣的CSS - 输入框选中交互动效
  • Unknown custom element:<xxx>-did you register the component correctly解决方案
  • 计算机网络自顶向下Wireshark labs-HTTP
  • 解决pandas写入excel时的ValueError: All strings must be XML compatible报错
  • 华为手表应用APP开发:watch系列 GT系列 1.配置调试设备
  • Vue(十九):ElementUI 扩展实现树形结构表格组件的勾父选子、半勾选、过滤出半勾选节点功能