源码之家

  • 首页
  • 文章
  • 问答
  • 下载
您的位置: 首页  >  文章  >  IDEA从Git repository中移除文件

IDEA从Git repository中移除文件

分类: 文章 • 2025-03-05 23:24:35

使用idea创建新项目提交git后,发现经常都有很多 idea目录下或者 iml文件有改动,这些本不需要提交

虽然加了.gitignore,由于这些已经加入过版本管理,所以.gitignore对他们无效

于是想办法把他们从版本库中移除,步骤如下:

1、使用git rm --cached -r 命令,从版本库中移除

IDEA从Git repository中移除文件IDEA从Git repository中移除文件

IDEA从Git repository中移除文件

2、提交本次修改

git commit -m "remove idea and iml files"

git push

3、添加.gitignore文件

IDEA从Git repository中移除文件IDEA从Git repository中移除文件


IDEA从Git repository中移除文件



相关推荐

  • 解决IntelliJ IDEA中git出现的 Could not read from remote repository问题
  • 解决IntelliJ IDEA中git出现的 Could not read from remote repository问题
  • IDEA从Git repository中移除文件
  • 解决IntelliJ IDEA中git出现的 Could not read from remote repository问题
  • 从idea中复制配置文件到外部或提交到svn中文乱码解决
  • idea从git上check项目,及在项目中屏蔽文件(目前工作用,就是记不住,还是写下来吧)
  • IDEA中Git的绑定及从GitHub导入项目修改后上传更新
  • 解决IntelliJ IDEA中ssh方式git出现的 Could not read from remote repository问题
  • git 如何将加入了git版本管理的文件从版本管理中删除
  • 【IDEA】- 进行Junit测试时 从 Resources读取文件 , 测试代码中读取的文件路径和实际的不一致
  • Git基础使用
  • javaScript基础三
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 源码之家    备案号:   粤ICP备20058927号