• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

清除git本地缓存和gitigore模板

武飞扬头像
Leslie_Lijiexiong
帮助3

一、清除git本地缓存

首先,.gitignore 只能忽略那些没有被追踪(track)的文件,且git存在本地缓存。
如果需要过滤文件之前已纳入了版本管理,那么除了修改ignore文件,还要清除本地缓存。

git rm -r --cached .
git add .
git commit -m "update .gitignore"

二、ignore文件模板

1. 后端

# Compiled class file
*.class

# Log file
*.log
*.imi
*.lst

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.idea
*.iml
out
.settings/
.project
.classpath
/*/target/
logs/
.txlcn

# ignore test file
**/src/test/

学新通

2. 前端

.DS_Store
# node_modules 正常工作时需要过滤该文件
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-eroor.log*
pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhfeahak
系列文章
更多 icon
同类精品
更多 icon
继续加载