重命名一个git子模块 [英] Rename a git submodule

查看:102
本文介绍了重命名一个git子模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一些简单的方法来重命名git子模块目录(除了经历>删除并重新添加一个新的目标名称)。

虽然我们在这,但为什么我无法在父目录中执行以下操作: git mv old-submodule-name new-submodule-name

解决方案

b


  • 更新.gitmodules

  • mv oldpath新路径

  • git rm oldpath

  • git add newpath

  • git子模块同步


Is there some easy way to rename a git submodule directory (other than going through the entire motion of deleting it and re-adding it with a new destination name).

And while we are at it, why is it that I simply cannot do the following in the parent directory: git mv old-submodule-name new-submodule-name

解决方案

I found following workflow working:

  • Update .gitmodules
  • mv oldpath newpath
  • git rm oldpath
  • git add newpath
  • git submodule sync

这篇关于重命名一个git子模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆