0

I want to ignore public folder and its inside folders and file in git

public/app
public/dist/file.html
public/dist/bower_components/
public/dist/fonts/
public/dist/scripts/

i want to ignore all of them and their inside files i followed this link Add newly created specific folder to .gitignore in Git

I am doing it like this in .gitignore file

public/app/*
public/dist//*
public/dist/bower_components/*
public/dist/fonts/*
public/dist/scripts/

but its not working ,i can stil see these files on git status

swaheed
  • 3,671
  • 10
  • 42
  • 103
  • 1
    please share the output of `git status`, also mention whether you have tried `git rm` as suggested in the link in your post – Imran Ali Aug 09 '17 at 11:18

2 Answers2

1

Ignore /public/ (leading and trailing slashes, no asterisk).

phd
  • 82,685
  • 13
  • 120
  • 165
0

First verify git status if you have already add this folders. If you was add, try to remove them git rm -r --cached directory.

Next put only public/* in .gitignore to ignore all file in public's folder.

Tisp
  • 436
  • 2
  • 15