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

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

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

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