Skip to content

Suggestion: Add .gitignore file to repo #11

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

Closed
ivalaginja opened this issue May 5, 2025 · 2 comments
Closed

Suggestion: Add .gitignore file to repo #11

ivalaginja opened this issue May 5, 2025 · 2 comments

Comments

@ivalaginja
Copy link

Result of review in openjournals/joss-reviews#7917.

When I install your package locally from source, I get all the build files dumped inside the repo (which is normal). Since these are local files that shouldn't be committed and pushed, I recommend including a .gitignore file in the top level of the repo. You can fill it with:

  • a filter for local build files (i.e., *.egg-info/)
  • a filter for pycache files (i.e., .pyc)
  • file extensions for the most common code editors (e.g., .iml for PyCharm, .vs for VSCode)
  • randomly created hidden files based on the OS (e.g., .DS_Store for MacOS)

And example for a very simple .gitignore file is:

*.pyc
*.iml
*.egg-info/
.ipynb_checkpoints/
.idea/
.vs
.DS_Store

In this way they don't pollute your git working tree when working with a clone of the repo directly. This is handy both for developers (you) and your users.

@xiaziyna
Copy link
Owner

xiaziyna commented May 5, 2025

Thanks for the suggestion - I have added this and removed the rogue '.pyc' files. This seems like a nicer way to do things than relying tracking by eye!

  • I believe these are all the rogue build files but please let me know if you saw any others.

@ivalaginja
Copy link
Author

It is indeed, git can feel like true magic sometimes! 🙃

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

No branches or pull requests

2 participants