I'm using Laravel 5.8, these 2 files often show up on my git status
.
Should I add them to .gitignore ?
I'm using Laravel 5.8, these 2 files often show up on my git status
.
Should I add them to .gitignore ?
In the folder bootstrap/cache
there should already be a .gitignore
file containing the following lines:
*
!.gitignore
and it's this file that will fix your issue
Add this line in your .gitignore
file
bootstrap/cache
and then run
git rm -r --cached bootstrap/cache
git rm -r
is used to untrack files in a Git branch. This command will remove the file from the staging area and also will remove the file from the repository next time you commit.
You should always .gitignore
cache files, they're never meant to reach the actual production server.
So create a .gitignore
file in the bootstrap/cache
folder, and put the following two lines:
*
!.gitignore
Remember you might have to remove the files and git push before you can actually ignore them.