I had the same error:
radato$ git submodule update
fatal: git upload-pack: not our ref somehash0
fatal: remote error: upload-pack: not our ref somehash0
fatal: Fetched in submodule path 'dashboard', but it did not contain somehash0. Direct fetching of that commit failed.
So I deinitialized the submodule:
radato$ git submodule deinit -f dashboard
Cleared directory 'dashboard'
Submodule 'dashboard' (ssh://git@bitbucket.org/somedomain/dashboard.git) unregistered for path 'dashboard'
Now checking the summary I get
radato@$ git submodule summary
* somepath1 somehash1 (2):
< Merged in fixed_edge (pull request #2)
< fixed broken test
* somepath2 somehash2 (2):
< Merged in dsp_tx_freq (pull request #14)
< Merged in v0.2.0 (pull request #13)
Eventually I pulled:
radato@$ git pull --prune --recurse-submodules --force
Fetching submodule dashboard
Fetching submodule somepath1
Fetching submodule somepath2
Already up to date.
Submodule path 'somesubmodulepath1': checked out 'somehash1'
Submodule path 'somesubmodulepath2': checked out 'somehash2'
And now it works again. Here is the status
radato$ git status
On branch develop
Your branch is up to date with 'origin/develop'.
nothing to commit, working tree clean