在服務器(ubuntu 20)上初始化我的 laravel 8 應用程式后,我需要上傳一些存盤下的影像,這些影像被 .gitignore 規則排除在 git 之外。
我根本不喜歡洗掉 .gitignore ,但是如果有辦法只排除這些規則一次?
似乎有一些強制選項,但我如何使用它在本地運行命令:
git push -u origin master
在服務器上:
git pull origin master
?
我的根 .gitignore:
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore
# Node artifact files
node_modules/
dist/
# Compiled Java class files
*.class
# Compiled Python bytecode
*.py[cod]
# Log files
*.log
# Package files
*.jar
# Maven
target/
dist/
# JetBrains IDE
.idea/
# Unit test reports
TEST*.xml
# Generated by MacOS
.DS_Store
# Generated by Windows
Thumbs.db
# Applications
*.app
*.exe
*.war
# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv
/public/js/laravel.app.js
/public/js/oneui.app.js
/public/js/tables_datatables.js
/public/css/oneui.css
composer.lock
package-lock.json
.env
vendor/
route_list.txt
哪個是正確的語法?
謝謝!
uj5u.com熱心網友回復:
看起來像添加 -f 鍵,如:
git add -f storage/app/public/Photos/1/img-13.jpg
在我的情況下有效
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/407112.html
標籤:
下一篇:比較和交換回圈如何實作原子性?
