gitignore常用配置

toc

java版

以下是.gitignore的常用配置,需要的话,可以自己再添加一些啊。

python 复制代码
.mymetadata
.checkstyle
.classpath
.project
.class
.war
.zip
.rar
.idea
*.iml
.settings/*
/indexes/*
/target/*
/src/main/webapp/WEB-INF/classes/*
/src/main/webapp/userfiles/*
/target/
/target
mobile.sql

官网自带的代码是:

bash 复制代码
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**

python版

python 复制代码
# 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/
share/python-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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
#   For a library or package, you might want to ignore these files since the code is
#   intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# 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/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# 1. 忽略整个 .idea 目录
.idea/

# 2. 强制不忽略(放行)团队需要共享的核心配置文件
!.idea/misc.xml
!.idea/modules.xml
!.idea/vcs.xml
!.idea/inspectionProfiles/

STS

.apt_generated

.classpath

.factorypath

.project

.settings

.springBeans

.sts4-cache

IntelliJ IDEA

.idea

*.iws

*.iml

*.ipr

NetBeans

/nbproject/private/

/nbbuild/

/dist/

/nbdist/

/.nb-gradle/

build/

VS Code

.vscode/

语法解释

虽然一直在用,但是并不是很清楚。

.(点号)表示什么意思

.(点号) 表示按扩展名匹配

实战忽略application-dkh.yml

试了几种通配符方法不好用,干脆直接全路径,实测有效。

startup/src/main/resources/application-dkh.yml

前提:文件未被add,如果添加了那么ignore应该是无效的。

相关推荐
雯0609~16 小时前
gitee:凭证过期无法推送,解决方案(Gitee token 过期)
gitee
qq_267612891 天前
Gitee 软件工厂选型评估与分阶段落地路线图:能力拆解、适用场景判断与改造成本测算
gitee
没伞的行者2 天前
《C++ Primer Plus(第六版)全书代码整理 | 章节源码 + README知识总结(Gitee、GitHub开源)》
linux·开发语言·c++·gitee·github
7177772 天前
让权限治理成为可复制资产:Gitee Team 空间配置方案与安全级别落地详解
数据库·gitee
阳墨余2 天前
Git 同时管理 Gitee 和 GitHub 的 SSH 配置实战
git·gitee·github
暮云星影3 天前
git版本发布
git·gitee·github·gitea
暮云星影3 天前
git仓库分支管理
git·gitee·github·gitea
cakeism8254 天前
信创产业与国产替代:政策框架、产业进展与研发基础设施实践
gitee
麦芽糖02195 天前
本地已有项目首次上传到gitee
gitee
承渊政道5 天前
KES专业技能包发布:覆盖数据库开发、迁移与运维全流程
运维·数据库·gitee·数据库开发·金仓数据库