git, don't show me *.pyc in the list of untracked files!

前端 未结 7 996
执笔经年
执笔经年 2020-12-07 10:55

When doing:

>git status

It shows a big list of .pyc files under \"untracked files\". I don\'t want it to show these, as it adds noise.<

7条回答
  •  自闭症患者
    2020-12-07 11:21

    If I recall, there is a way to setup a global .gitignore... But the problem with that is you can't share it with other people (that is, other people who pull your code will see the .pyc files).

    So, IMHO, it's better to just add it to the .gitignore for each project you start. I keep a stock .gitignore around for just that reason.


    Or you could switch to bzr, which comes with a sensible default list of things to ignore ^_^

提交回复
热议问题