我必须做什么克隆 github 存储库,回滚到旧版本并更新 ubuntu 16.04 上的子模块?

What i must do that clone github repository, rollback to old version and update submodules on ubuntu 16.04?

我需要为 android 目标重建 openfl/lime,在 ubuntu 16.04 x64 下。这允许我使用我的 haxeflixel 项目 "lime build android" 语法,android 应用程序版本 26,很快将成为最低允许版本,在 google playstore 中发布。

我需要知道 ubuntu 16.04 克隆 github 项目的步骤,回滚到旧版本和更新子模块,例如 windows 的 TortoiseGit 可以做到。

这是 github link https://github.com/openfl/lime 我需要克隆它并将版本回滚到 2.9.1,并更新子模块。 github 上最新版本的 lime 是 5.9.1。 但是我之前只用过sourcetree(windows)等,不知道如何又快又好地解决我的问题

OS ubuntu 16.04.3 x64

确保 git 已安装:

sudo apt-get install git

创建一个目录来保存代码并克隆 repo:

cd ~
mkdir tmp
cd tmp
git clone -b 2.9.1 --recurse-submodules https://github.com/openfl/lime.git openfl_lime

这会将 repo 克隆到目录 openfl_lime,从标签 2.9.1 本地检出并同步所有子模块。

或者,您可以在 https://github.com/openfl/lime/releases/tag/2.9.1

处获取发行版的 tar 或 zip 文件

或者,您可以直接使用 haxelib 降级 lime:

haxelib install lime 2.9.1

(您可能需要对 openfl 和其他需要的库执行相同的操作)