For a rails template I'd like to add a submodule of a specific tag to new rails apps. To keep this simple I'd like to avoid going into subdirectories and running git commands there.
git submodule add --branch v1.3.37 [email protected]:foo.git vendor/foo
Is what I would like to use, but it does not accept tags for the --branch
parameter:
fatal: 'origin/v1.3.37' is not a commit and a branch 'v1.3.37 cannot be created from it Unable to checkout submodule 'vendor/foo'
Is there a simple way to add a git submodule on a specific tag?