Is there a way that I can prevent a public GitHub repository from showing up on search results? And if yes, how can I do this?

3 Answers 3


Pretty much the opposite of this question.

Since the only part of the repository that GitHub's robots.txt permits search engines to crawl is the master branch, if you remove or rename that then your repository won't be crawled.

If you don't want that, the only other options are to not use GitHub or pay for an account which lets you have private repositories (if you are a student you may be able to get a discount or free upgrade).

  • + someone want to be sure that the repository name and the description does not contain the search keywords you want to exclude yourself from
    – Csaba Toth
    Commented Apr 10, 2018 at 1:43

Don't make master branch.

Why? https://github.com/robots.txt disallows all and allows something to crawl.

Here is similar question and good answer: https://stackoverflow.com/a/15987482/437763


Or you can use bitbucket - https://bitbucket.org/

It's free and you can have private repositories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.