wenus
wenus

Reputation: 1525

laravel gitIgnore doesn't ignore my folder

I would like to ignore whole 'public' folder, I added this manually to my gitIgnore file, but still when I commit I can see things from this folder. How to do to file gitignore start ignore this?

My gitignore looks like this:

/vendor
/node_modules
.env
composer.lock
/public
/.idea
.phpstorm.meta.php
_ide_helper.php
npm-debug.log
package-lock.json
.gitattributes

Upvotes: 2

Views: 5744

Answers (2)

Abhay Dixit
Abhay Dixit

Reputation: 1018

You can use -

git rm -r --cached <your file/directory Name>

Upvotes: 4

arku
arku

Reputation: 1707

The simplest way to do it:

  1. temporarily move out from repository the public folder.
  2. Do commit
  3. move it back. It will be ignored.

Upvotes: 5

Related Questions