I'm looking to install Git in a custom location different from the default usr/local/git/bin/git
directory that the package installer from the http://git-scm.com/ website installs to.
For example, I just tried copying the contents of usr/local/git
to /Users/braitsch/my-git
and updating my path variable to /Users/braitsch/my-git/bin
and now Git's unhappy saying that it can't find some of its commands such as git -stash
.
I also just tried setting ./git exec-path=/Users/braitsch/my-git/libexec/git-core
but that doesn't seem to be taking.
So my question is how can I setup a custom install of Git without the use of package managers or pre-built installers? I'd love to find a scenario that I could easily use on both Mac and Windows.
Update
It looks like Git stash (and possibly other commands) will fail if you move the directory that gets installed at usr/local/git
via the package installer to another location. How can I get around this? I'm trying to run Git from a custom location but it appears this is not possible via the builds on the http://git-scm.com site?