robots.txt - How to stop Google indexing my Github repository -


i use github store text of 1 of web sites, problem google indexing text in github well. same text show both on site , on github. e.g. this search top hit site. second hit github repository.

i don't mind if people see sources don't want google index (and maybe penalize duplicate content.) there way, besides taking repository private, tell google stop indexing it?

what happens in case of github pages? sites source in github repository. have same problem of duplication?

take this search top hit leads the marpa site don't see source listed in search result. how?

the https://github.com/robots.txt file of github allows indexing of blobs in 'master' branch, restricts other branches. if don't have 'master' branch, google not supposed index pages.

how remove 'master' branch:

in clone create new branch - let's call 'main' , push github

git checkout -b main git push -u origin main 

on github change default branch (see in settings section of repository) or here https://github.com/blog/421-pick-your-default-branch

then remove master branch clone , github:

git branch -d master git push origin :master 

get other people might have forked repository same.

alternatively, if you'd financially support github, can go private https://help.github.com/articles/making-a-public-repository-private


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -