git - 启动 GitBash 时未执行 .bashrc

标签 git bash ssh git-bash

我正在关注 this guide ,我已经到了需要创建 .bashrc 文件的部分,当我重新启动 GitBash 时它似乎没有执行。我已经尝试了一些事情,包括 this SO question 上的答案.我也试过只在其中添加一个 echo 进行测试,当我直接执行它时它起作用,但当我启动 GitBash 时不起作用。

最佳答案

我通过执行 git-bash -l -c bash 解决了这个问题(-l 是小写的 L)。 这样我的 $HOME/.bashrc 就会立即执行。
我在 Windows 7 上使用 PortableGit 2.5.0。

关于git - 启动 GitBash 时未执行 .bashrc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32152210/

相关文章:

bash 在两个给定日期之间循环

ruby - 使用 rbenv 安装最新稳定版本的 Ruby

git - 哪些 DVCS 支持 Unicode 文件名?

git - 如何将新的(重写的)历史推送到远程存储库

git - 仍有冲突,但 git 显示 "No files need merging"

git - 无法将 git 存储库部署到 dokku 实例( fatal error : {reponame} does not appear to be a git repository)

ssh - autossh 不工作并且运行时没有任何错误消息

git - Visual Studio Code 自动推送

linux - 循环退出并转到bash中的下一行

通过 ssh 从远程存储库 :fatal: protocol error: bad line length character: fata 进行 git 克隆