繁体   English   中英

如何在 Git 中为运行 bash shell 的 Windows 安装 git 子仓库

[英]How to install git subrepo in Git for Windows running bash shell

我知道这里有关于在 Git 中为 windows 安装gitsubrepo说明

我知道我必须做什么,但是,我不知道在哪里可以找到 shell 启动脚本。 我已经安装了 Git Bash shell,我不知道它的 shell 启动脚本在哪里。

有谁知道启动脚本在哪里?

只要:

  • git在你的$PATH
  • git subrepo .rc文件已添加到您的.bashrcsource /path/to/git-subrepo/.rc' >> ~/.bashrc ,从 git bash 会话完成)

您可以使用常规的 git-bash shell,然后开始键入git subrepo命令。

“shell 启动配置”是您克隆存储库的.rc文件(在 git bash 会话中的/c/path/to/your/git-subrepo/clone中)

如果你克隆 C:\Users\Me\git-subrepo,你需要输入 bash session:

source /c/Users/Me/git-subrepo/.rc' >> ~/.bashrc

OP wiyosaya做了(在评论中):

  • 创建.bashrc: touch ~/.bashrc
  • 添加缺少的行: echo source /c/GitHub/git-subrepo/.rc >> ~/.bashrc

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM