I wanted to pull commit "3a2ceef391af73994dfeb0d8ef57ed6a52ef4238" from branch android. I used the command:
$ git fetch origin 3a2ceef391af73994dfeb0d8ef57ed6a52ef4238
and it is showing this error,
error: Server does not allow request for unadvertised object 3a2ceef391af73994dfeb0d8ef57ed6a52ef4238
How to solve this problem?
The error message "Server does not allow request for unadvertised object" is reported when a commit updating a submodule pointer points to a commit that does not exist in the repository for that submodule, even if later commits in the branch points to a commit that do exist in the submodule repo.
git submodule sync synchronizes all submodules while git submodule sync -- A synchronizes submodule "A" only. If --recursive is specified, this command will recurse into the registered submodules, and sync any nested submodules within.
A git submodule update will bring the latest commits into your local Git worktree. In this git submodule update example, we'll show you how branches can seem out of sync between your submodule and the latest commit, and how to issue the appropriate git command to update those git submodules with the latest code.
git submodule sync
as pointed in https://github.com/AppImage/AppImageKit/issues/511 works for me.
According to this answer and the given source it looks like BitBucket does not allow you to fetch a commit id, only references.
I cannot say if you can configure this behavior, but I think you can:
git pull origin branchname
git checkout <commitid>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With