See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.
The Solution To resolve the problem remove from the repository the tracked files contained in the . gitignore file. To achieve this use “git rm” to remove and untrack all the files in the repository, then use “git add” to re-add all the files (the files contained in the .
gitignore was having an effect--if the file was Unicode, it was ignored, if it was ASCII, it wasn't.
Use Git update-index to ignore changes To resume tracking, run the git update-index command with the --no-skip-worktree flag. Or, you can temporarily stop tracking a file and have Git ignore changes to the file by using the git update-index command with the assume-unchanged flag.
.gitignore
only ignores files that are not part of the repository yet. If you already git add
ed some files, their changes will still be tracked. To remove those files from your repository (but not from your file system) use git rm --cached
on them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With