0

My project has dependencies. The dependencies are added as submodules.

A given submodule released a new major version that breaks my code.

In my personal copy I may cd into submodule folder git checkout specific version to fix this.

How do I store this specific version in a way that any fresh git clone; git submodule update --init --recursive comes with the correct version for the submodule?

  • Perhaps in .gitmodules?
  • "It's currently not possible and you should just add that specific version library code directly into your repository" ?
WurmD
  • 1,231
  • 5
  • 21
  • 42
  • Possible duplicate of [Understanding git submodule and "freezing" it at a specific commit hash or version](https://stackoverflow.com/questions/7238426/understanding-git-submodule-and-freezing-it-at-a-specific-commit-hash-or-versi) – phd Nov 26 '18 at 16:21
  • Freezing is the whole point of submodules. But you have to avoid `git submodule add -b`. – phd Nov 26 '18 at 16:22
  • https://stackoverflow.com/search?q=%5Bgit-submodules%5D+specific+commit – phd Nov 26 '18 at 16:22

0 Answers0