推动git时如何保留文件的权限

发布于 2025-02-03 11:57:58 字数 218 浏览 1 评论 0原文

我们有一个zip文件,其中所有项目(laravel)文件都存储。由于没有已知的方法在Git中提取文件,因此我们所做的就是提取文件,然后将目录推向GIT。

一切都在起作用;

  1. 没有上传空文件夹,我们在所有空文件夹中添加了.gitkeep文件,以使其
  2. 保留权限。对于这个问题,我们仍然没有找到解决方案。

任何与建议有关的建议都将是高度应用的。

We have a zip file where all project(Laravel) files are stored. Since there is no known way of extracting files inside git, what we did was to extract the files, and then pushed the directory to git.

Everything is working except;

  1. empty folders were not uploaded, we added a .gitkeep file to all empty folders to keep them
  2. the permissions were not preserved. for this problem, we still havent found a solution.

Any advice related would be highly appriciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城°AllureLove 2025-02-10 11:57:58

您需要将所需的文件(在这里),添加,提交和推送。

但请记住只有644和755版本的Git。
您有脚本可以更新更改的文件上的权限

You would need to chmod the files you want (like here), add, commit and push.

But keep in mind only 644 and 755 are versioned with Git.
You have scripts which can updates the permissions on changed files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文