0

I am working in Laravel 5.6.*(probably latest in 5.6 line) project, where I just found that the npm run dev command generated bunch of CSS & JS files into /public/css and /public/js paths respectively.

When I try to block those files from being detected by Git, thro' .gitignore like below, it still gets detected, why this unexpected behavior ?:

.gitignore trial 1:

/public/css
/public/js

.gitignore trial 2:

public/css/*
public/js/*

I haven't edited the GitBash version(2.14.*, Windows 10) I am using, so I suppose both the above syntax should work, but they both aren't, can anyone help out ?

Vicky Dev
  • 1,893
  • 2
  • 27
  • 62
  • 1
    `public/css/` and `public/js/`? – Cyrus Jun 03 '20 at 21:30
  • I suppose this is hardly relevant, I am starting GitBash as admin, but I change into project directory and then only run `git status`. Also once I change `.gitignore`, I don't think there's any need to close and re-open the GitBash into the same directory, is there ? – Vicky Dev Jun 03 '20 at 21:32
  • 1
    No need to restart bash after changing the `.gitignore` file – Craig Wayne Jun 03 '20 at 22:15
  • 2
    tried your first suggestion and that works, wanna supply the output of `git status` – Craig Wayne Jun 03 '20 at 22:42

0 Answers0