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应该是无效的。 ​

相关推荐
效能革命笔记8 小时前
Gitee DevSecOps 智能版本管理:军工软件工厂的依赖治理与供应链安全方案
网络·安全·gitee
加贝哥|usun11 小时前
最佳实践分享:GitHub项目自动同步到Gitee(码云)
gitee·github
少司府14 小时前
Tools相关:深入浅出学Git
大数据·c++·git·gitee·github·仓库·分支
效能革命笔记1 天前
国内首家|Gitee Repo 通过信通院「先进级」认证:企业级制品库核心能力与选型指南
gitee
我叫张小白。2 天前
PyCharm 集成 Git 与 Gitee
git·pycharm·gitee
z200509302 天前
【linux学习】在linux下使用git提交到gitee
git·学习·gitee
效能革命笔记2 天前
企业软件供应链安全优选:Gitee CodePecker SCA核心能力与选型参考
安全·gitee
效能革命笔记3 天前
2026年开源组件治理选型:Gitee SCA如何成为一体化解决方案的推荐之选
gitee·开源
知兀8 天前
【IDEA/Pull Request】pr流程;插件gitee pull requests
gitee