AnEricZhang / git-osx-installer

Automatically exported from code.google.com/p/git-osx-installer
0 stars 0 forks source link

Mac OS X Lion #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Seems my git was removed upon update, and cant seem to reinstall it 

"-bash: git: command not found"

MAC OS 10.7.0

Original issue reported on code.google.com by gavshous...@gmail.com on 20 Jul 2011 at 9:18

GoogleCodeExporter commented 8 years ago
Does /usr/local exist?  Does /usr/local/git exist?  It's probably a PATH 
issue... I don't know why you'd be experiencing it though since OS X Lion still 
supports /etc/paths.d, which is what the git installer uses to inject itself 
into the path.

Original comment by timchar...@gmail.com on 20 Jul 2011 at 11:05

GoogleCodeExporter commented 8 years ago
Hmm you was correct, i have a binary located here /usr/local/git/bin/git and my 
/etc/paths.d/git contains /usr/local/git/bin which once i changed to 
/usr/local/git/bin/ it worked.. 

Original comment by gavshous...@gmail.com on 21 Jul 2011 at 12:14

GoogleCodeExporter commented 8 years ago
Hmm thats strange. I just did a clean install of lion, no time machine restore, 
 and it works ok, not requiring the trailing slash change... hmm

Original comment by timchar...@gmail.com on 21 Jul 2011 at 1:48

GoogleCodeExporter commented 8 years ago
I did an upgrade from Snow Leopard 10.6.8 and had the same problem as 
gavshous...@gmail.com
Entering an / in the /etc/paths.d/git file did the trick for me too!

Original comment by djvdthem...@gmail.com on 21 Jul 2011 at 3:02

GoogleCodeExporter commented 8 years ago
Strange... do you have other paths there?  Xcode 4.1 put the following in my 
/etc/paths:

{{{
  timcharper@TimTheEnchanter:~ $ cat /etc/paths.d/50-X11 
  /usr/X11/bin
}}}

No trailing slash.  This is really weird

Original comment by timchar...@gmail.com on 21 Jul 2011 at 3:06

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
$: cat /etc/paths.d/*
/usr/X11/bin
/usr/local/git/bin/

Original comment by gavshous...@gmail.com on 21 Jul 2011 at 3:08

GoogleCodeExporter commented 8 years ago
Type `which git`... what do you get?

I get:

  timcharper@TimTheEnchanter:~ $ which git
  /usr/local/git/bin//git

Original comment by timchar...@gmail.com on 21 Jul 2011 at 3:09

GoogleCodeExporter commented 8 years ago
$ which git
/usr/bin/git

Original comment by gavshous...@gmail.com on 21 Jul 2011 at 3:10

GoogleCodeExporter commented 8 years ago
In my etc/paths.d are 2 files:

50-X11 with the same line as you in it:
/usr/X11/bin (no trailing slash)

and

git with this line in it:
/usr/local/git/bin

then it said: git not found

I added the trailing slash:
/usr/local/git/bin/

working as before on Snow Leo....

Original comment by djvdthem...@gmail.com on 21 Jul 2011 at 3:11

GoogleCodeExporter commented 8 years ago
Be interesting to know if djvdthem...@gmail.com had the github application 
installed aswell, as i know i did, although i rarely use it

Original comment by gavshous...@gmail.com on 21 Jul 2011 at 3:11

GoogleCodeExporter commented 8 years ago
$ which git
/usr/local/git/bin//git

$ cat /etc/paths.d/*
/usr/X11/bin
/usr/local/git/bin/

reply to gavshous...@gmail.com:
I never had an Github application installed, only my Github account setup using 
the regular git commands.

Original comment by djvdthem...@gmail.com on 21 Jul 2011 at 3:14

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
@gavshouse90 if you get /usr/bin/git... you're using the Xcode provided git.  
You'll have to edit /etc/paths and put /usr/local/git/bin at the top.

I don't think there's a way to precede the paths specified in /etc/paths with 
/etc/paths.d... not sure best how to deal with this.  One thing I thought of 
was to start installing in /usr/bin, over-writing the version Xcode installs.

Original comment by timchar...@gmail.com on 21 Jul 2011 at 3:24

GoogleCodeExporter commented 8 years ago
@timchar...@gmail.com Yeah i have just installed XCode this morning, i will 
swap them around.

Original comment by gavshous...@gmail.com on 21 Jul 2011 at 3:35

GoogleCodeExporter commented 8 years ago
@timchar...@gmail.com Thank you for your answer .. I was beating my head 
editing all my .profile files and it was still using the xcode installed 
version. Simply making the change to /etc/paths was the answer

Original comment by giancarl...@gmail.com on 16 Oct 2011 at 5:44

GoogleCodeExporter commented 8 years ago
Just thought I'd chime in and let others know I ran into this as well. Clean 
install of Lion + Xcode + GitHub (if that makes a difference) + git installer 
1.7.7. git works just fine, but it defaults to Xcode version (1.7.4.4) in 
/usr/bin/git unless I change it in /etc/paths. 

Original comment by ralphthemagician on 8 Nov 2011 at 12:10

GoogleCodeExporter commented 8 years ago
Wow, trailing / worked for me too...nice catch!

Original comment by b...@butler.net on 5 Feb 2012 at 5:19

GoogleCodeExporter commented 8 years ago
Can anyone explain why adding the trailing slash works?

Original comment by ralphthemagician on 22 Oct 2012 at 5:31

GoogleCodeExporter commented 8 years ago

Original comment by timchar...@gmail.com on 13 Dec 2012 at 6:15