Git 操作,忽略 .yml 文件上的特定文件夹

发布于 2025-01-13 15:07:37 字数 444 浏览 3 评论 0原文

我是新使用 git 操作的。 因此,我使用 git 中的操作自动从我的存储库部署到我的 sftp 服务器,一切正常,但是当操作执行时需要很长时间,大约 20 分钟,在我的存储库上存在系统、应用程序和 dist 等文件,因此,这种文件我不想重新上传。 做了一些研究,我发现它们可以忽略某些路径。

我发现可以使用“paths-ignore”忽略它们,但由于某种原因它不起作用,这是我的文件。

输入图片这里的描述

我想忽略应用程序/缓存、应用程序/配置、应用程序/核心..等中的所有内容,或者所有文件夹“应用程序/缓存”、“应用程序/配置”..等

什么我做错了吗?可以这样做吗?

im new using git actions.
So im using actions from git to automate deployment from my repository to my sftp server, everything works fine, but when the action is on execution takes to much time, around 20 minutes, on my repo exist files like system, application, and dist so, that kind of files i don't want to re-upload.
Doing a little research I found out that they can be ignored certains paths.

I found out that they can be ignored with "paths-ignore" but for some reason it's not working, this is my file.

enter image description here

I want to ignore all the content inside application/cache, application/config, application/core .. etc.Or all the folder "application/cache", "application/config".. etc

What am I doing wrong? It's possible to do that?

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

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

发布评论

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

评论(1

君勿笑 2025-01-20 15:07:37

首先我有一个建议:

不要将所有这些文件放入存储库中,git 用于版本控制代码,而不是用于存储。

paths-ignoreon: 事件的配置,这意味着当 on 时,您的存储库中发生了更改,但 中的更改除外paths-ignore,启动工作流程。

没有办法减少工作流程中的太多时间,因为每个 job 都会创建一台新机器来获取所有 git 存储库并启动一些工作流程。但是您可以阅读有关 SFTP-Deploy-Action 的更多信息,并使用参数 local-path 上传您想要的内容,也许您的工作流程会缩短到 10 分钟。

First I have a suggestion:

Don't put all these files inside your repository, git is for versioning code and not for storage.

paths-ignore is a config for on: event, which means when that on you have changes in your repository, except changes in paths-ignore, start the workflow.

There is no way to reduce too much time in your workflow because every job creates a new machine that gets all your git repository and starts some workflow. But you can read more about the SFTP-Deploy-Action and use the parameter local-path to upload just what you want, maybe your workflow drop to 10 minutes.

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