是否有可能有一个自定义.gitignore?只读访问? [英] Is it possible to have a custom .gitignore? Read only access?

查看:146
本文介绍了是否有可能有一个自定义.gitignore?只读访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在团队环境中工作,并且已经有 .gitignore 文件。



我想要将更多的项目添加到 .gitignore 文件中,但我不想检查这个文件。可以设置只适用于我的自定义忽略文件吗?



另外,如果我想让某人只读访问我们服务器上的私人git存储库添加他们的SSH密钥到我们的服务器,他们将像其他人一样获得完全访问权如何将其限制为只读,不允许提交。

规则在 .git / info / exclude 中。请参阅 gitignore(5)
  • 对于只读访问,请使用 git -daemon ,一个网络服务器或Gitosis或Gitolite。


  • I am working in a team environment, and there is already a .gitignore file.

    I want to add more items to the .gitignore file, but I don't want to check this file in either. It is possible to set custom ignore files which only apply to me?

    Also, I want to give someone read only access to a private git repository on our server, if I add their SSH key to our server they will get full access like everyone else. How can I limit it to read-only, no commits allowed.

    解决方案

    1. Put your private ignore rules in .git/info/exclude. See gitignore(5).
    2. For read-only access, use git-daemon, a web server, or Gitosis, or Gitolite.

    这篇关于是否有可能有一个自定义.gitignore?只读访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆