Bug 37556 - Add project folders of popular IDEs to .gitignore
Summary: Add project folders of popular IDEs to .gitignore
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Rudolf Byker
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-02 08:21 UTC by Rudolf Byker
Modified: 2024-10-04 09:19 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Ignore .idea and .vscode (895 bytes, patch)
2024-08-02 08:25 UTC, Rudolf Byker
Details | Diff | Splinter Review
Bug 37556: Add project folders of popular IDEs to .gitignore (959 bytes, patch)
2024-08-02 13:34 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Rudolf Byker 2024-08-02 08:21:24 UTC
Ignoring the .idea and .vscode folders makes working with the Koha repo using IntelliJ IDEA or VS Code easier.

Patch incoming.
Comment 1 Rudolf Byker 2024-08-02 08:25:10 UTC
Created attachment 169991 [details] [review]
Ignore .idea and .vscode
Comment 2 Pedro Amorim 2024-08-02 12:58:50 UTC
Rudolf, I believe this is ready for others to look at? If so, you should update its status to "Needs Signoff" or else it won't show up in people's TODO lists.
Comment 3 Rudolf Byker 2024-08-02 13:24:30 UTC
Oh, I forgot that. Thanks
Comment 4 Pedro Amorim 2024-08-02 13:34:10 UTC
Created attachment 169999 [details] [review]
Bug 37556: Add project folders of popular IDEs to .gitignore

Ignoring the .idea and .vscode folders makes working with the Koha repo using IntelliJ IDEA or VS Code easier.

To test:
1. Clone the Koha repo.
2. Open the repo folder in an IDE like IntelliJ IDEA or VS Code.
3. Observe that the IDE creates an .idea or .vscode folder but does not try to commit it.

Sponsored-by: Reformational Study Centre <www.refstudycentre.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 5 Julian Maurice 2024-08-19 06:28:02 UTC
Just in case you don't already know: you can ignore these files without touching .gitignore, either globally using $HOME/.config/git/ignore or locally using .../koha/.git/info/exclude
I use that to ignore vim temporary files.
Comment 6 Katrin Fischer 2024-08-19 07:49:46 UTC
(In reply to Julian Maurice from comment #5)
> Just in case you don't already know: you can ignore these files without
> touching .gitignore, either globally using $HOME/.config/git/ignore or
> locally using .../koha/.git/info/exclude
> I use that to ignore vim temporary files.

I can confirm that this works. I looked it up remembering Julian hat pointed it out a while ago.

I was going to suggest adding a hint to the wiki, only to realize it's already there :)

https://wiki.koha-community.org/wiki/Koha-testing-docker

Maybe this would be better than adding IDE specific code to Koha codebase?
Comment 7 Rudolf Byker 2024-10-04 08:28:06 UTC
> Maybe this would be better than adding IDE specific code to Koha codebase?

Sorry to nit-pick here, but it's IDE-specific config, not IDE-specific code (i.e., it has no effect on the end product, only on the developer experience).

It's conceptually similar to something like `.editorconfig`. It's standard practice in many projects that I have seen to have IDE-specific stuff in `.gitignore`. The reason why I would not want to do this in my `.git` settings, it because I have other projects on my machine where `.idea` and/or `.vscode` should not be ignored.
Comment 8 Julian Maurice 2024-10-04 09:19:57 UTC
> It's conceptually similar to something like `.editorconfig`
Except .editorconfig is not specific to a single editor/IDE and *should* be committed to the repository. How are they similar in this context ?

(In reply to Rudolf Byker from comment #7)
> The reason why I would not want to do this in my `.git`
> settings, it because I have other projects on my machine where `.idea`
> and/or `.vscode` should not be ignored.
You can still ignore it in the repository specific .git/info/exclude file, or ignore it globally and then de-ignore it in a project specific file. Honestly it's easier than asking every project you work on to add rules for your preferred tools. (Never had seen a .swp file even once since I learned that ;))