Search code examples
gitgitignore

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

Solution

  • 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.