Veesha Dawg Veesha Dawg - 4 years ago 221
Linux Question

git bash shell .bashrc not working everytime

I have a .git directory in my Dropbox, to store data for my website. In the directory, I have a

file, like this:

directory and .bashrc

When I type this into the bash terminal, it echo's

$ source .bashrc
my login

but when I restart terminal, it echo's nothing. I have to source it again.

I've read a few posts about this issue, about having to source it again and again but they said that if you do it to .bashrc it will work everytime. Mine doesn't. Where am I messing up?

Answer Source

When bash goes looking for its startup files, it generally looks for .bashrc in your home directory (where it currently isn't).

If you want to source a separate .bashrc file, probably the esiest solution is to put something like this into your actual one (the one that bash will run), $HOME/.bashrc:

if [[ -x "${otherOne}" ]] ; then
    . "${otherOne}"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download