Wednesday, November 3, 2021

[SOLVED] .bashrc not executed when starting GitBash

Issue

I'm following this guide, I've gotten to the part where I need to create the .bashrc file and it doesn't seem to execute when I restart GitBash. I've tried a few things including the answers on this SO question. I've also tried just having an echo in it for testing, which works when I execute it directly, but not when I start GitBash.


Solution

I solved the problem by executing git-bash -l -c bash (the -l is a lower-case L). With that my $HOME/.bashrc gets executed immediately.
I am using PortableGit 2.5.0 on Windows 7.



Answered By - Boomer