There is no problem not worth solving, and no technology not worth learning!

Edit .gitignore to add some ignoring directories (the directory name is unknown, the directory name is generated based on the uuid)

编辑 .gitignore,文件与目录 puclic 平级 ,以添加一些忽略目录(目录名未知)。在目录:public 下会生成一些目录,而这一些目录皆应该被忽略

1. Edit .gitignore, the file is level with the PuClicic level, to add some ignore directories (the directory name is unknown). Some directories are generated under the directory: public, and these directories should be ignored. as shown in Figure 1

编辑 .gitignore,文件与目录 puclic 平级 ,以添加一些忽略目录(目录名未知)。在目录:public 下会生成一些目录,而这一些目录皆应该被忽略
Figure 1

2. View the current content, all content starting with /public/


/public/certificate_sandbox.*
/public/.well-known
/public/hot
/public/storage
/public/js
/public/global
/public/chunk
/public/default
/public/css
/public/venue
/public/showtime
/public/vogue
/public/athena
/public/checkout
/public/fonts
/public/iconfont
/public/images
/public/12345
/public/*.js
/public/*.js.LICENSE.txt
/public/mix-manifest.json
/public/nginx.htaccess

# /public/fonts
/public/vendor

/public/page-cache/



3. Check the submitted files that have not been ignored under the gitlab directory public. as shown in Figure 2

查看 GitLab 目录 public 下未被忽略的已经被提交的文件
Figure 2

4. It is not possible to specify the directory name under public explicitly, because these directory names (UUID form) are automatically generated when the program runs.

Therefore, only clearly defined in the public directory, which files should not be ignored. Reference:https://git-scm.com/book/zh/v2/Git-%E5%9F%BA%E7%A1%80-%E8%AE%B0%E5%BD%95%E6%AF%8F%E6%AC%A1%E6%9B%B4%E6%96%B0%E5%88%B0%E4%BB%93%E5%BA%93ignore files in. Ignore all the files in the /public directory before adding the exception. adjusted to


/public/*
!/public/modules
!/public/appcode.png
!/public/domain.txt
!/public/favicon.ico
!/public/index.php
!/public/logo.png
!/public/robots.pages.txt
!/public/robots.txt
!/public/tracking-api.js
!/public/web.config


6. Create a new file /public/1.php, /public/modules/2.php, when submitting, it is found that only the file /public/modules/2.php is submitted, based on uuid Some directories that have been generated have been ignored. in line with expectations. If there are new directories or files that need to be submitted in the subsequent /public directory, you need to add ! to confirm that you need to track. as shown in Figure 3

新建文件 /public/1.php、/public/modules/2.php,提交时,发现仅有文件 /public/modules/2.php 被提交,基于 UUID 生成的一些目录已被忽略。符合预期。如果后续 /public 目录下有新的目录或者文件需要提交,则需要添加 ! ,以确认需要跟踪
Figure 3

Need long-term technical maintenance or remote troubleshooting?

I am a PHP / Go backend engineer with 15+ years of experience, focused on existing system maintenance, bug fixing, performance optimization, server troubleshooting, WordPress maintenance, and small feature iterations.

If your project is facing any of the following issues, we can start with a small troubleshooting task first:

  • ✅ PHP / Laravel / Yii2 legacy systems without active maintenance
  • ✅ Go / Gin backend APIs that need troubleshooting or optimization
  • ✅ Slow, broken, or unstable WordPress websites
  • ✅ Nginx / MySQL / Redis / Linux server issues
  • ✅ CDN / Cloudflare / DNS / HTTPS configuration problems
  • ✅ Long-term remote technical support or part-time maintenance

More details: About Me & Collaboration

WeChat: 13980074657
Email: shuijingwanwq@gmail.com
Telegram: @shuijingwan
GitHub: https://github.com/shuijingwan

评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.