天下脸皮共十分
我占八分

存量项目删除.idea和target文件夹跟踪

添加如下.gitignore文件到项目根目录


target/
*.jar
!.mvn/wrapper/*
*.war
*.zip
*.tar
*.tar.gz

# eclipse ignore
.settings/
.project
.classpath


# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp

# system ignore
.DS_Store
Thumbs.db
*.orig

# idea ignore
.idea/
*.ipr
*.iws
.mymetadata
.checkstyle
.classpath
.project
.class
.war
.zip
.rar
*.iml
.settings/*
/indexes/*
/target/*
/src/main/webapp/WEB-INF/classes/*
/src/main/webapp/userfiles/*
/target/

执行如下命令删除已跟踪文件/文件夹

git rm --cached --force -r target
git rm --cached --force -r .idea
git rm --cached --force data-structure.iml
git commit -m "for git ignore"
git push

对于.gitignore文件,可以通过插件生成对应语言的版本

File -> Settings -> Plugins 搜索框搜索.ignore,点击安装

赞(0) 打赏
未经允许不得转载:Stephen Young » 存量项目删除.idea和target文件夹跟踪
分享到: 更多 (0)

相关推荐

评论 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏