.bashrc not executing when starting gitbash

I follow this guide , I got to the part where I need to create a .bashrc file, t seems to be executed when I restart GitBash. I tried several things, including the answers to this SO question . I also tried just having an echo in it for testing, which works when I execute it directly, but not when starting GitBash.

+4
source share
3 answers

I solved the problem by running git-bash -l -c bash (-l is lowercase L). With this, my $ HOME / .bashrc will be executed immediately.
I am using PortableGit 2.5.0 for Windows 7.

+5
source

As of Git 2.5.0.bashrc no longer refers to% USERPROFILE% \. bashrc.

But you can edit this file: "C: \ Program Files \ Git \ etc \ bash.bashrc". This is a global file, but it will have to do.

I also recommend editing the files located in the folder "C: \ Program Files \ Git \ etc \ profile.d" instead of creating .bashrc.

Files inside this folder are read as follows:

Some good standards that are not used if the user

creates its own .bashrc / .bash_profile

+3
source

First, be sure to use the latest Git:

  • uncompressed PortableGit-2.5.0-64-bit.7z.exe anywhere, and add C: \ path \ to \ PortableGit-2.5.0-64-bit \ bin to your %PATH% .
  • then update %USERPROFILE%\.bashrc
  • finally run C:\path\to\PortableGit-2.5.0-64-bit\git-bash.exe

If you are already in a bash session when modifying .bashrc, send it again to see if it does what you need.

 source .bashrc 
0
source