If you get an error like
error: Server does not allow request for unadvertised object f8889311e5cae9dd207a2c864bfd47b14ec3433d Fetched in submodule path 'mediawiki/extensions/Foo', but it did not contain f8889311e5cae9dd207a2c864bfd47b14ec3433d.
That means that you made a commit to the Foo project that didn't get pushed upstream (where it's visible to the pull/clone). If upstream is a project where you don't have commit access, you must create a branch (that you can rebase onto) and **also** host a fork of the origin. In other words, you're not going to commit changes into Mediawiki core (or even third-party extensions) if they're local modifications. So, if your work is based on REL1_31 of Mediawiki core, then make a branch from that, then publish it (privately if needed) as a fork meaning that there's still a remote reference to gerrit. This way you can work with all your changes, and also you can pull in (via rebase) any changes to the upstream release.