如何保护自己的GitHub代码不被别人覆盖

我们在自己的github上创建了免费的公开代码,为了防止别人通过git push upstream master 覆盖了自己原有的代码,需要作一下设置:Settings->Branchs,然后在“Protected branches”下面选择“master”:

a1.png

 

之后,勾选“Protect this branch”即可。

 

a2.png

 

posted @ 2018-05-29 18:12  码农骆驼  阅读(2643)  评论(0编辑  收藏  举报