Remove .pyc files from Git remote repository

前端 未结 10 698
广开言路
广开言路 2021-01-30 10:37

Accidentally, I have pushed the .pyc files to the master repository. Now I want to delete them but I can´t do it. Is there any way to remove them directly from the Bitbucket sit

10条回答
  •  情歌与酒
    2021-01-30 10:47

    Quick way with PyDev for eclipse.

    Go to the PyDev Package Explorer of your project and do:


    • right click + Pydev / Remove *.pyc *.pyo and *$py.class File

      a window will popup telling you how many files have been deleted.

    Optional: Commit your change to the team/server:

    • right click + team / commit

    In the commit window you shouldn't see any .pyc available to add as we deleted them. Also if you committed such files before then you should be able to commit their "deletion" now.

    ===> Your local and server repository are now free of *.pyc *.pyo and *$py.class File :)

提交回复
热议问题