'git tag –contains <commit>' without cloning the repo?
Sometimes i want to check what tags contain a specific commit (for example – a bug fix which I need and want to know what package versions are good for me).
The only way I know, is:
git tag --contains <commit_id>, but that requires cloning the project.
Can I do it without cloning? Either from the command line or directly via the GitHub website?
3 Solutions collect form web for “'git tag –contains <commit>' without cloning the repo?”
GitHub does display branches and tags containing a commit in the web interface. Look at the commit description box. Eg. for https://github.com/StackExchange/blackbox/commit/3e9091722cdbc000831d22274cc5b92f9a819dae we see master, v1.20170611, v1.20170309, stable and production.
So does Gitlab: eg. https://gitlab.com/mailman/mailman/commit/3df8d5182b44148bbd4b43f5474cd67b2ca699f9 is in master, cherry-pick-f2f7cfc5, click-cli, release-3.1, testing-gitlab and 3.1.0.
Bitbucket doesn’t seem to do it and neither does gitweb.
if you want to try you need that repository. then only git will find your given commit id on specific repository otherwise it will say bad object
if you are in some repository
git tag --contains <commit_id> with commit which is belongs to another repository means it will say bad object…
BTW you need repository to try this…
you can view it in github under your
repository -> code section
and then select commits will list your commits with tag
To manipulate a git repository using advanced commands like this one, git needs to have a full copy of it.
There’s no clean way around it, except if github as implemented it (not the case for this one).