Hi Jerry

> 
> Despite its limitations, I like to use the Source Control in Xcode instead of 
> the git command line for common everyday tasks.  I have an iMac and a MacBook 
> Air which both have Xcode 7.1 and OS X 10.11.  On the iMac, Xcode’s Source 
> Control works great but on the Air I’ve had a lot of trouble the past few 
> months, particularly repositories not showing in the menu, and “Scanning for 
> working copies…” forever.
> 
> On the iMac, git version reports
>    git version 2.4.9 (Apple Git-60)
> 
> On the Air,
>    git version 1.8.2.3


So I presume you got this versions by opening Terminal and typing "git 
version”. If so, what you are seeing are versions that are installed on your 
computer and that you can access via Terminal only. These versions of git are 
NOT those that Xcode uses. Xcode uses git that is inside its own package, 
usually at:

/Applications/Xcode.app/contents/Developer/usr/bin/git

Usually, the git that you use via Terminal is installed at:

/usr/local/git/bin/git

and the version you are seeing is the one that is accessible through Terminal.


> I suspect this is the trouble.  

It might be. To ensure that you uninstall the previous version on your Mac Air, 
I suggest that use this shell script. It will do the hard work for you:

https://gist.github.com/klarstil/5317126


> Bloggers explain how to replace the Apple Git, implying that it is bad, but 
> don’t explain this assumption.

Probably what they are saying is that you should NOT try to replace the git 
command inside Xcode by the version of git you downloaded from the internet and 
use it with Terminal or GitX. That can cause you a lot of pain if you do that, 
because Xcode might become unstable, as it has not been tested against the 
newest version of git. If you mess with git you may lose your work, because git 
is a kind of a file system on top of the Mac (HFS) file system. So if your ever 
feel adventurous and you want to try it anyway you'd better have backups of 
your work.


> 
> • Which do I want, for best working with Xcode, the the special “Apple” 
> version of git, or the latest git 2.6.2 from sourceforge.net?

That only work if you use it through Terminal, not via Xcode.

However, if you really want to use the latest version of git you can download 
from git-scm.com, then I would highly recommend the free GUI GitX available at:

https://rowanj.github.io/gitx/

This is a fork of the original GitX and I can tell you is far superior in terms 
of visualisation of diffs and branches than Xcode, and moreover, you are in 
control of what git version it is using. All you have to do is to download the 
latest version of git and GitX will start using it immediately. Moreover, it 
works well in El Capitan. GitX is a MUST if you dislike to use git via Terminal.

> 
> • If the answer is the former, how do I get it?  Can I just copy it from 
> /usr/bin on my iMac?

Don’t do that. Just use the installer available at git-scm.com

> 
> • Apparently, updating Xcode is updating git on the iMac but not on the Air.  
> Why might this be?  I just tried manually reinstalling the command-line tools 
> with (xcode-select —install) on the Air, but it still left me with git 
> 1.8.2.3.
> 

You are seeing that because of what I explained earlier. One thing has nothing 
to do with the other.


> Thanks,
> 
> Jerry Krinock


HTH

João Varela






 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to