Gitignore doesn't want to ignore a folder

Hello,

I have a gitignore file where i put a folder to ignore but gitignore doesn’t ignore the folder. When i push to github it is refused because the folder is to big. How to fix that ? Is there command to do when you add a folder to ignore after a commit ? I did many things but nothing solve the problem. Thank for your help

i assume that “folder” is already “tracked” and in github commits?

perhaps looking into this article would help, happy reading :slight_smile: How to Git Ignore Already Tracked Files Effortlessly | GitBreeze

and the tuto runs with folder because i found for file not for folder. Maybe it’s the same solution ?

yeah logic is similar if not same :slight_smile:

i did

git rm -r --cached siteWeb

and i have that message : fatal: pathspec ‘siteWeb’ did not match any files

ok i delete the repo and add new repo now gitignore ignore the folder