【发布时间】:2022-06-25 17:55:29
【问题描述】:
我从 GitHub 分叉了一个包,并在上面进行了几次提交。我想在项目中使用特定的提交。如何在我的项目中使用特定的提交。
【问题讨论】:
我从 GitHub 分叉了一个包,并在上面进行了几次提交。我想在项目中使用特定的提交。如何在我的项目中使用特定的提交。
【问题讨论】:
请参阅 Dart 文档中的 Package dependencies > Dependency sources > Git packages:
dependencies: kittens: git: url: git@github.com:munificent/kittens.git ref: some-branch引用可以是 Git 允许 identify a commit 的任何内容。
因此您可以将您的提交哈希写为 ref: 的值以使用该特定提交。
【讨论】:
另一种方式是这样的:
flutter_cool_card_swiper:
git:
url: https://github.com/esmaeil-ahmadipour/flutter_cool_card_swiper
【讨论】: