在我的laravel5.7应用程序中,我使用带有命令的存储
php artisan storage:link当我将文件上载到/storage子目录时,它们不会上传到git,因为我的项目的根.gitignore有默认选项:
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea $ git add .
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: .gitignore
new file: public/storage
/.vscode
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env我试图修改这个文件如下:
/node_modules
/public/hot
/public/storage/clockwork
/public/storage/debugbar
/public/storage/framework
/public/storage/logs
/storage/clockwork
/storage/debugbar
/storage/framework
/storage/logs
/vendor
/.idea
/.vscode
/.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env但是看起来没什么用,因为git上传中没有添加任何文件(我在
$ git add .
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: .gitignore
new file: public/storage/storage/):
$ git add .
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: .gitignore
new file: public/storage哪条路是对的?
谢谢!
发布于 2018-09-24 14:24:46
在storage/app/public内部将有一个.gitignore文件,需要根据您的喜好进行删除或编辑。
如果您想在storage/app中提交storage/app中的所有内容(并不是真正推荐的),那么在storage/app中也有一个
https://stackoverflow.com/questions/52481280
复制相似问题