开发者

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

开发者 https://www.devze.com 2023-02-20 07:53 出处:网络
This question already has answers here: 开发者_StackOverflow中文版Closed 11 years ago. Possible 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

精彩评论

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