.gitignore下面制定了*.pyc但是无效?
高洛峰
高洛峰 2016-11-09 11:02:19
0
3
555

我在git的根目录下面新建了一个.gitignore文件,然后添加了以下的内容

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

但是如果我现在修改了一个.py文件,编译后用git status查看

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   views.py
    modified:   views.pyc

no changes added to commit (use "git add" and/or "git commit -a")

请问应该怎么解决这个问题,让git忽视.pyc文件的修改

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!