0
点赞
收藏
分享

微信扫一扫

移除git仓库中无意提交的隐藏文件夹.idea

Sikj_6590 2022-02-24 阅读 208
  1. 如果.gitignore文件中包含了.idea目录则先去掉;
  2. 然后执行以下命令将.idea隐藏文件夹添加到git管理中去,否则在步骤3会遇到错误:fatal: pathspec '.idea' did not match any file
    git add .

  3. 执行git rm --cached -r .idea命令删除git管理中的.idea隐藏文件夹,--cached表示不删除本地文件,-r是递归删除
  4. git status查看一下状态
  5.  git commit -m 'delete .idea'
  6. git push origin master

举报

相关推荐

0 条评论