开发者

Why remote git server should have --bare

开发者 https://www.devze.com 2022-12-24 19:45 出处:网络
I am reading these two articles. However I still do not get --bare option. If the server has no work开发者_如何转开发ing directory and if a new member of the team clones the project then that person w

I am reading these two articles. However I still do not get --bare option. If the server has no work开发者_如何转开发ing directory and if a new member of the team clones the project then that person will not get any content.

Any further clarification will help on why --bare is needed.


Whether or not the server has a working tree does not affect clients who directly clone the remote repository.

In either case they will get a full copy of the remote repository's objects and, on initial clone, a local branch will be set up to track the remote repository's default branch (usually master) and this local branch will be checked out.

It is usually recommended that the remote repository be made bare as attempting to push to a branch which is checked out would cause the remote's working tree to become out of sync with its checked out branch. It is usually not necessary for the remote repository to have a working tree.

0

精彩评论

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

关注公众号