git-submodules - 使用特定的提交号添加 git 子模块
问题描述
我正在使用 git submodule 命令在我的项目中添加这个 FSM 存储库。我想检查一个特定的发布提交。默认情况下,主分支已签出。添加 git repo 后,当我运行时
$ git submodule
它给
d1b66d66cfa95f238a7498465908a262f4b2326a directory_path/fsmlite
这里的提交号属于一个主分支提交。如何使用其提交号签出另一个提交?
解决方案
可能还有其他方法可以做到这一点,但我得到了所需的提交
$ cd directory_path/fsmlite
$ git checkout v0.7.1 (this is the branch I wanted to point to)
$ git submodule update
$ cd parent_dir
$ git submodule
+de19ea0a71cb6082fe9311694a27e8f0cc2f972a directory_path/fsmlite (v0.7.1)
这是我想要的具体提交号
推荐阅读
- python - 用双引号括起来的 Python 字符串连接
- grafana - 在 Grafana 中将仪表板设置为主页
- c# - 计算时进度条不显示
- javascript - 或嵌套列表 - Vuetify
- django - 如何正确地将 API 与 Django 中的视图匹配
- c# - C# ,SQL 仅当 txtBasoC.Text > 0 时才插入这些 SqlCommand,如果不是,则跳过并执行下一个 SqlCommand
- kubernetes - 访问 HTTPS 服务出口,istio v1.0
- python - 如何在 py_func 中访问 Tensorflow Graph?
- c++ - 在 C++ 计算脚本中总是返回 466750944
- python - AttributeError:“NoneType”对象没有属性“strip”..编辑 CSV 时