简体   繁体   中英

Why is .gitignore not ignoring my files?

See the image below. My .gitignore file should be ignoring all files in src\/dist, but isn't.

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't.

在此处输入图片说明

对于我项目中的一些文件,我需要使用git filter-branch ,这在这个answare 中有更好的解释。

first check the .gitignore encoding.
make sure the encoding id utf-8 .
then untracked unwanted file by using git rm --cached filename now your problem fixed 😁

If your.gitignore file isn't ignoring your files and directories.

If you have already git added certain files, their modifications will be tracked. Use git rm -r --cached on such files to delete them from your repository (but not from your file system).

git rm -r --cached .        #untrack files
git add .                   #re-adding the files
git commit -m "issue fixed" #commiting changes
git push                    #pushing changes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM