Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How do I set PATH and other environment variables?

I recently installed git 1.7.4.4 via the installer from here http://code.google.com/p/git-osx-installer/ (not via homebrew or stuff...) and found that it added itself to my $PATH.

I wonder, where did it do that? I checked my ~/.bashrc and also /etc/bashrc and /etc/profile, nowhere is a line like PATH=$PATH:/usr/local/git/bin

Out of curiosity, where did the git-installer put the change to the path??

share|improve this question

migrated from stackoverflow.com Jun 12 '11 at 12:38

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Daniel Beck, slhck, studiohack Jun 13 '11 at 0:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Related (with good section on Mac OS X, that already contains both answers from OS). –  Daniel Beck Jun 12 '11 at 12:41
1  
I don't know about OSX, but on linux, your bash profile generally sources /etc/profile, which then sources /etc/profile.d/*.sh. –  Jefromi Jun 12 '11 at 15:49
    
IMO this question isn't a duplicate. The OP knows how stuff is usually added to the PATH, but git does it in an unusual way. Jefromi is correct - in the /etc/paths.d directory, there is a file named git containing the path to the git binary. –  cantera25 Jun 28 at 0:11

2 Answers 2

Have a look in /etc/paths.d/. If there is a file called git, this is how your $PATH is manipulated.

Since Leopard, there is an alternative method for manipulating the PATH by adding text files to /etc/paths.d/ containing lines that will be appended to the PATH variable. Kind of simple, but it does cause issues if you aren't aware of it.

EDIT: There is also a corresponding /etc/manpaths.d/

share|improve this answer

Perhaps it's located in /etc/paths??

cat /etc/paths
share|improve this answer