PyCharm and source control, the .idea directory, commit or not commit, that is the question

后端 未结 2 1066
予麋鹿
予麋鹿 2021-02-08 06:13

I started a new PyCharm project and want to version it with Mercurial.

There is a .idea directory in the project directory with the following files (and my assumption ab

2条回答
  •  醉梦人生
    2021-02-08 07:18

    Depends on whether you want to share just the code or share the code and project settings too.

    For just sharing the code, I add the following to the .hgignore file:

    ^.idea
    ^.idea/*
    /*/.idea
    /*/.idea/*
    

    The patterns are a bit overkill, but they eliminate all the PyCharm/Workspace stuff.

    We primarily use Subversion where I work and I frequently create a Mercurial repo on top of the Subversion checkout to play with possible tweaks and changes. If you go that route and in particular if you chain the Mercurial repos, then add these entries to the .hgignore file too:

    ^.svn
    ^.svn/*
    /*/.svn
    /*/.svn/*
    

提交回复
热议问题