I have meta repo, named anecdotes which has two submodules - utils & global-sync. global sync has also utils submodule in it. In anecdotes repo there is .gitmodules file, with this content:
[submodule "globals-sync"]
path = globals-sync
url = https://github.com/organization/globals-sync.git
branch = master
[submodule "utils"]
path = utils
url = https://github.com/organization/utils.git
branch = master
global sync .gitmodules file content is:
[submodule "utils"]
path = utils
url = https://github.com/organization/utils.git
default branch for utils repo is develop and default branch for global-sync repo is master (the global-sync repo contains, as I said, utils submodule).
git version is 2.30
And now - describing the issue: In github actions, trying to deploy from anecdotes repo. First I checkout to anecdotes repo - by doing so, the action checking out repo and the submodules (fetching & cloning it) at this point - the global-sync & utils repo checked out properly (means - as it's being committed in anecdotes repo)
Now, I want to update submodules to latest commits (in the remote)So I run:
git submodule update --remote
Which immediately failed with the following error:
fatal: Needed a single revision
Unable to find current origin/master revision in submodule path 'utils'
After reading a lot of similar problems I could isolated the problem:: here
By cd to utils directory and get info about the repo, I saw that "master" branch is not exist: "git branch -a" listed only develop branch
any ideas?
- I deleted the utils directory in anecdotes and cloned it - the problem still occures.
- Tried to do update submodules locally - successfully.