'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.

  • automatically rejecting a commit based on certain criteria
  • git status returns fatal: Not a git repository but .git exists and HEAD has proper permissions
  • JSON formatting extra characters
  • Is merging branch A into B same as merging B into A?
  • git fatal:No tags can describe <sha1 number>
  • Git get changes between hash A and B to working directory
  • Can I do it without cloning? Either from the command line or directly via the GitHub website?

  • Logging execution and errors of git-receive-pack on restricted server?
  • When using git submodule update how can you tell it to clone the dependencies with HTTP instead of GIT?
  • Git production release
  • Do I need Git to use Github in JetBrains IntelliJ IDEA?
  • git fetch/merge non-fast-forward changes?
  • How to version-control spread-out files without replacing the originals?
  • 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

    for eg:

    if you are in some repository
    you’re trying 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).

    Git Baby is a git and github fan, let's start git clone.