On Tue, 10 Apr 2012 06:46:12 -0700 (PDT)
Paul Hollyer <p...@hollyer.me.uk> wrote:
> > env $PATH
> > to see what your path looks like.
> Thanks for the quick replies, here is the result of env $PATH:
> sbin:/sbin:/usr/local/rvm/bin:/root/bin: No such file or directory
> I assumed re-installing git would make it add the required paths
> where necessary again if they had been broken.
Installing something by `make install` never touches the environment
(and for good).
> Can you help me fix this?
> Git is at /usr/local/src I think,
Possibly you unrolled the Git source tarball there, but when you did
it probably picked /usr/local as its "installation prefix",
so supposedly you do have main Git binary under /usr/local/bin, and
that's what you're supposed to add to your PATH.
> so how do I add this to the search path?
The answer is "it depends".
The most correct approach (to me) is to find binary package(s) for Git
matching your OS (and its version), and install them. This gives you
1) Git will be installed in a well-known place, where it will be
accessible without messing with the user's environment.
2) You will have less problems when uninstalling or upgrading Git later,
as this will be routinely carried out by the package manager.
If you insist on building Git from the source, there are two ways:
1) Run `./configure --help` and see what it needs to install Git into
the standard hierarchy, that is, under /usr.
Usually this is --prefix=/usr
2) Install as-is, but notice where the files are installed.
Just run `make install >/tmp/log` and inspect the generated log file
to see where the files have been installed.
In the latter case you might have to fix the environment *of the user
under which account Git will run.* This is important: from the output
you shown us, it follows that you run this command as root. It's
highly unlikely you're pushing as root as well (if you're a sensible
person at least), and you have to tweak either the global environment
or the environment of the mentioned user.
How to do that depends on the shell which is spawned by SSH on the
server when you push. Usually it's the same as the user's login shell
(the one used for interactive logins).
The config file to tweak depends on the shell.
For bash this will be
and you'll have to add to it something like
> Sorry if it's a basic linux question, but am learning by doing, and
As you can see, you'll have to get a book on Unix and read it as the
question being discussed has little to do with Git.
You ccan also get help on relevant resources such as news groups
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at