別マシンから

git pull --recurse-submodules  
したときなどに,
fatal: remote error: upload-pack: not our ref [コミットID]
fatal: The remote end hung up unexpectedly
Fetched in submodule path '[レポジトリ名]', but it did not contain [コミットID]. Direct fetching of that commit failed.
と出た場合.
  • 原因1
    submoduleのレポジトリをリモートレポジトリにpushし忘れている
    →作業していたマシンでgit push --recurse-submodulesする.

  • 原因2
    submoduleのoriginのURLが変わった
    git submodule sync