Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git: correctly ignore docs build directory #499

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

erlend-aasland
Copy link
Contributor

No description provided.

.gitignore Outdated Show resolved Hide resolved
@erlend-aasland erlend-aasland deleted the gitignore branch July 7, 2024 22:04
@erlend-aasland erlend-aasland restored the gitignore branch July 7, 2024 22:08
@erlend-aasland erlend-aasland reopened this Jul 7, 2024
@erlend-aasland erlend-aasland changed the title Git: ignore various generated and temporary files Git: correctly ignore docs build directory Jul 7, 2024
@erlend-aasland
Copy link
Contributor Author

FTR; here's the current variant of the gitignore template that this project's .gitignore was based on:

https://github.com/github/gitignore/blob/main/Python.gitignore

Perhaps it is time to sync with the modern variant.

@acolomb
Copy link
Collaborator

acolomb commented Jul 8, 2024

Wow, that template really has a lot of stuff listed. I hope I'm not alone with my opinion though - what's ignored in a project's Git configuration should be based on objective decisions relevant to the code-base. Thus I don't want any IDE state crap (e.g. .vscode) there, nor temporary files used by random tools (*.swp) or operating systems (.DS_Store). In my view, all these are specific to the individual developer's environment and should therefore be added as "local" or "system-wide" ignores in Git (see GitHub's docs ).

The version-tracked ignore patterns should target files that are expected to be generated by the build process(es) and should be hidden to avoid accidently adding generated files to the versioning. Thus this (remaining) change is fine, as the docs will land at the specified location.

Putting a venv directory inside the source worktree is a concious choice by the developer, thus their individual responsibility. It can be ignored locally via .git/info/exclude.

Temporary files and system caches can be handled the same way, or even globally via ~/.config/git/ignore.

If anything, we should clean out the current .gitignore to get rid of all this template stuff that someone imagined could ever be there. For adding new stuff, my current policy is outlined above, and tries to avoid piling up stuff from random trending IDEs and such, because there will be no end to the proliferation.

@acolomb acolomb merged commit c413eaf into christiansandberg:master Jul 8, 2024
2 checks passed
@erlend-aasland erlend-aasland deleted the gitignore branch July 8, 2024 10:46
@erlend-aasland
Copy link
Contributor Author

If anything, we should clean out the current .gitignore to get rid of all this template stuff that someone imagined could ever be there.

Sure, go ahead :) I have no interest in following this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants