This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: gitignore settings files for Eclipse IDE
Type: enhancement Stage: resolved
Components: Versions: Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: JDLH, berker.peksag, methane
Priority: normal Keywords:

Created on 2017-02-09 08:24 by JDLH, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 75 JDLH, 2017-02-09 08:27
PR 6 rajathagasthya, 2017-03-25 00:50
PR 1764 gfyoung, 2017-05-24 17:24
Messages (8)
msg287388 - (view) Author: Jim DeLaHunt (JDLH) * Date: 2017-02-09 08:24
The Eclipse IDE, and its relatives pydev and LiClipse, store settings in the root of a repository. It would be nice for the master .gitignore file to ignore these files, so that individual developers don't have to do this. 

I am preparing a GitHub Pull Request that fixes this issue. It is a matter of adding 4 lines to the top-level .gitignore file.
msg287389 - (view) Author: Jim DeLaHunt (JDLH) * Date: 2017-02-09 08:27
A fix is in GitHub cpython PR #75.
msg287391 - (view) Author: Jim DeLaHunt (JDLH) * Date: 2017-02-09 08:48
I'm now looking at cpython as retrieved from Mercurial by Eclipse. It appears to be concerned by the presence of 
.project
which is also an Eclipse settings file.  

It might be reasonable to extend the scope of this issue to include telling Mercurial to ignore settings files. My pull request does not do this, because I haven't yet learned the right Mercurial action.
msg287392 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-02-09 08:53
We'll move to github soon.  So no need for caring hgignore.

While there is `.vscode` in gitignore already, I'm not fan of
adding hundreds of IDE specific rule to gitignore.
Why don't you use gitignore_global?
msg287393 - (view) Author: Jim DeLaHunt (JDLH) * Date: 2017-02-09 09:10
gitignore_global is a great idea. I had not heard of it before. 

But here it is: https://help.github.com/articles/ignoring-files/  . This instruction also has a link to a gist with a lot of helpful global ignores.

I understand your reluctance to add entries for every IDE. Maybe a better solution would be to add something to the devguide about excluding IDE settings files, with a link to the Github instructions.
msg287395 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-02-09 09:26
Thanks for the report and for the patch, Jim! I agree with Inada. global_gitignore is a better way to achieve this.

> Maybe a better solution would be to add something to the devguide about
> excluding IDE settings files, with a link to the Github instructions.

Our goal is to only cover CPython specific topics in devguide. There a lot of things that can be mentioned in devguide, but it would be hard to maintain all these information and keep devguide short at same time :)
msg287396 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2017-02-09 09:46
I agree with Berker.

But some git/github tips are very useful for CPython core developers while they aren't CPython specific.
And some of them are not in beginner's guide.

I think it's worth enough to add link to such tips.

* Use gitignore_global to ignore IDE/Editor specific files: https://help.github.com/articles/ignoring-files/
* Checkout pull request without adding remote: https://help.github.com/articles/checking-out-pull-requests-locally/
* Readable patch by git diff --indent-heuristic (git 2.11+) or --compact-heuristic (git 2.9+).
* Creating lightweight working tree by git-new-workdir (like `hg share`):
 https://github.com/git/git/blob/master/contrib/workdir/git-new-workdir
msg287454 - (view) Author: Jim DeLaHunt (JDLH) * Date: 2017-02-09 21:11
I have set up a global gitignore, and it works for me. 
% git config --global core.excludesfile ~/.gitignore_global
(Amusingly, I had _already- set a global gitignore, but I had forgotten it existed, and it didn't ignore these IDE files.)

I agree that we should not put IDE entries in the CPython .gitignore. 

I also think it's a good idea to add the points Inada mentions in the developer doc somewhere. That should include the Git global ignore idea. I see Berker's point that the Devguide shouldn't get too big, but it also shouldn't leave out useful information. There's a balance to strike.

I think that's the topic of a different issue, however.  I'll open that when I get back to this.

In the meantime, if someone searches the issue database for "gitignore", they will find this discussion. That's helpful.

Thank you both for your responses, Inada and Berker.
History
Date User Action Args
2022-04-11 14:58:43adminsetgithub: 73696
2017-05-24 17:24:05gfyoungsetpull_requests: + pull_request1873
2017-03-25 00:50:14rajathagasthyasetpull_requests: + pull_request715
2017-02-09 21:11:14JDLHsetmessages: + msg287454
2017-02-09 09:46:41methanesetmessages: + msg287396
2017-02-09 09:26:23berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg287395

resolution: rejected
stage: resolved
2017-02-09 09:10:37JDLHsetmessages: + msg287393
2017-02-09 08:53:35methanesetnosy: + methane
messages: + msg287392
2017-02-09 08:48:52JDLHsetmessages: + msg287391
2017-02-09 08:38:05JDLHsettype: enhancement
2017-02-09 08:27:52JDLHsetmessages: + msg287389
pull_requests: + pull_request26
2017-02-09 08:24:53JDLHcreate