windows - 管理 windows 和 mac git 提交者之间的权限

标签 windows git macos permissions

故事是这样的……

我的团队在 Windows 文件服务器上有一个 git 存储库。 Windows 人员设置存储库并开始提交。我,一个 mac 人,克隆到我的文件系统,进行一些提交,然后推回(实际上我去 repo 并 pull 入我的更改)。现在的问题是我拥有对 repo 中文件的权限,即使我对我将 repo 克隆到的文件夹中的每个人都有读/写权限, repo 以某种方式对 Windows 操作系统施加了额外的权限限制,而我的同事不能提交。

这个场景也可以以另一种方式进行。我设置了存储库,一个 Windows 人员搞砸了权限。

那么你们如何确保不同开发环境之间的权限一致?

最佳答案

也许你可以尝试配置core.sharedRepository:

core.sharedRepository

When group (or true), the repository is made shareable between several users in a group (making sure all the files and objects are group-writable).

  • When all (or world or everybody), the repository will be readable by all users, additionally to being group-shareable.
  • When umask (or false), git will use permissions reported by umask(2).
  • When 0xxx, where 0xxx is an octal number, files in the repository will have this mode value. 0xxx will override user’s umask value (whereas the other options will only override requested parts of the user’s umask value).
    Examples: 0660 will make the repo read/write-able for the owner and group, but inaccessible to others (equivalent to group unless umask is e.g. 0022).
    0640 is a repository that is group-readable but not group-writable. See git-init(1).

False by default.

关于windows - 管理 windows 和 mac git 提交者之间的权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6841034/

相关文章:

git 用远程版本替换本地版本

javascript - 如果弹性滚动弹起时 DOM 发生更改,则滚动位置会跳跃

html - 如何在 Sublime 中为 webgl/glsl 内联脚本标签获得语法高亮

python - 从子进程启动时如何停止 Bottle Web 服务器

git - "fork"和 "push upstream"对 GitHub 意味着什么?

swift - 不为 NSMenu 调用 validateMenuItem 或 menuWillOpen

objective-c - 应用程序重新打开事件 - Cocoa/Objective C

Windows cmd : How to find and kill . 运行并使用 wscript 隐藏的 bat 文件?

c# - 判断驱动器是分区还是单独的 HDD

git - "git check-ignore *"和 "git ls-files --other --ignored --exclude-standard"有什么区别?