Is there any way to retrieve only one specific commit from a remote Git repo without cloning it on my PC? The structure of remote repo is absolutely same as that of mine and
You can simply fetch a single commit of a remote repo with
git fetch
where,
can be a remote repo name (e.g. origin) or even a remote repo URL (e.g. https://git.foo.com/myrepo.git) can be the SHA1 commitfor example
git fetch https://git.foo.com/myrepo.git 0a071603d87e0b89738599c160583a19a6d95545
after you fetched the commit (and the missing ancestors) you can simply checkout it with
git checkout FETCH_HEAD
Note that this will bring you in the "detached head" state.