Skip to content

Instantly share code, notes, and snippets.

@marcosricardoss
Last active March 11, 2021 13:47
Show Gist options
  • Save marcosricardoss/f05b03833e260d0103c6c189e6b6295b to your computer and use it in GitHub Desktop.
Save marcosricardoss/f05b03833e260d0103c6c189e6b6295b to your computer and use it in GitHub Desktop.
Fixing untrack files already added to git repository based on .gitignore
# MY DEFAULT .GITIGNORE FILE
# Project files and directories
/static/
/tmp/
/media/
/mysql/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# PyInstaller
*.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
# Translations
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Visual Code
.vscode
# remove everything from the repository
git rm -r --cached .
# re add everything
git add .
# commit
git commit -m ".gitignore fix"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment