开发者

How can one prevent a specific tag or branch from being fetched in a remote bare repository? [duplicate]

This question already has answers here: 开发者_StackOverflow中文版 Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜