How can one prevent a specific tag or branch from being fetched in a remote bare repository? [duplicate]
Possible Duplicate:
“Hiding” things in GIT
Is it possible to lock specific tags or branches down so they can't be fetched?
It is not possible, since when you clone a repository, you get the whole history and can then have access to all tags / branches / ...
What you can do is have two repository, one private where all those restricted branches / tags are present, and a public one where you only push branches / tags that should be accessible. You cannot make them disappear however.
Only if you keep those branches locally as opposed to remote. Whenever someone clones a repository they get the entire thing. That's the joy of distributed version control.
精彩评论