I use MsysGit on windows 7. I have one annoying problem. The entire bash_profile file seems to get executed twice. for example, I have the following echo line in the .bash_profile

echo "Boinkk..."

enter image description here

If I have

echo "Calvin..."
echo "Hobbes..."

Then I get enter image description here So I know that the .bash_profile file is getting executed twice and not each statement getting executed twice. The target for the "Git Bash" Executable is

C:\Windows\System32\cmd.exe /c ""C:\Program Files\Software\Git\bin\sh.exe" --login -i"

Does anybody know what I have to do to get the bash shell to execute the bash_profile statements only once?

link|improve this question

1  
because if each statement was getting executed twice, I should have got Calvin... Calvin... Hobbes... Hobbes... – Prasanth Aug 4 '11 at 8:46
Do you have any other rc files like bashrc that source bash_profile? I don't think it would do anything but try removing the -i from your target. – jw013 Aug 4 '11 at 9:18
feedback

1 Answer

up vote 1 down vote accepted

I'm not familiar with how to fix on Windows but if it were UNIX/Linux you could do:

echo $PATH <br />

and see where you're getting your double entry from. I'm speculating that your .bash_profile is being added to the path more than once. If you track down where the path is being manipulated you can fix your problem.

link|improve this answer
Thanks. Got it fixed – Prasanth Sep 3 '11 at 10:34
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.