Pycharm update gitignore invalid how to deal with

 

I believe that many people will encounter the same problem as me. After setting gitignore to exclude files or folders in Pycharm, it still does not take effect. At this time, you can try the method provided below, and the personal test is effective

Because pycharm will automatically run the git add . function, so after .gitignore is modified, you need to manually clear the cached content, and then add it again, then gitignore will work.

1. Open the command line of pycharm and enter the following command

# 清理缓存
git rm -r --cached .

# 重新提交
git add .

2. On pycharm again, click Submit

you're done

Guess you like

Origin blog.csdn.net/weixin_42019349/article/details/130763537
Recommended