question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add .gitignore file

See original GitHub issue

Maybe it’s better to add a .gitignore file to ignore python build files such as *.pyc, when I use this repo as submodule(here), it always come up with some “changes” image image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ulfalizercommented, Aug 3, 2019

Yeah, was looking at https://github.com/github/gitignore/blob/master/Python.gitignore for inspiration, but I think most of those might be a bit overkill or not apply for this project.

I added some distribution-related files now too.

0reactions
Neutreecommented, Aug 3, 2019

seems just pyc is enough for your repo.

and all the build files from python as bellow:

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignoring files - GitHub Docs
You can create a .gitignore file in your repository's root directory to tell Git which files and directories to ignore when you make...
Read more >
What is Gitignore and How to Add it to Your Repo
The .gitignore file is a text file that tells Git which files or folders to ignore in a project. A local .gitignore file...
Read more >
git - How to create a .gitignore file - Stack Overflow
For a .gitignore file choose Other → Empty and click on Next. Type in the name (.gitignore) into the Save As field and...
Read more >
.gitignore file - ignoring files in Git | Atlassian Git Tutorial
If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and...
Read more >
How to Use a .gitignore File - Pluralsight
A .gitignore file is a plain text file where each line contains a pattern for files/directories to ignore. Generally, this is placed in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found