Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do you select a system git installed by homebrew at /usr/local/bin/git?

Steven Mitcham April 10, 2012

I'm using a homebrew installed git version that is at /usr/local/bin/git but I can't select this in the browse window for setting the system git.

How can I select this as my git option?

5 answers

1 accepted

0 votes
Answer accepted
Steven Mitcham April 11, 2012

Ok, it was related to hidden files. By following the instructions here: http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/

I was able to get SourceTree to see the /usr folder and select the correct version of git.

0 votes
Insomniac Software December 17, 2012

Sorry to bring up an old thread but just wanted to let you know of a trick to help out here that most users don't know about.

You don't need to show all the hidden files per your linked instructions. Instead, when you click on the "Use System Git" button which brings up the Open dialog window, press the / key, as if you were typing /usr/local... This will show a dialog sheet asking you to manually enter a directory. If you can remember the Cmd-Shift-G shortcut (as Steve Streeting mentioned), it also works here, but I can remember the / easier.

Steve Streeting [Atlassian], perhaps a future version can have a popup menu that a user can choose from, that SourceTree checks for at default locations, which would also show the version and path. Something like

Embedded (1.7.11.1) SourceTree.app

System (1.7.10.2) /usr/libexec/git-core/git

Homebrew (1.8.0.2) /usr/local/bin/git

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2012

We actually already check for default system locations and start the open dialog at that point, but really want to let people specify it themselves for the other options like Homebrew, because I don't want to assume in case it changes.

Insomniac Software December 18, 2012

Ah, right. I forgot to add the last entry of "Other" that would allow them to pick a different install location.

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2012

Ah, it's because when I click 'Use System Git' by default it finds the standard version (installed from mercurial.selenic.com) in /usr/local/git/bin, which means I can get to /usr very easily.

One way to get around this for now is to go to Finder, press Cmd-Shift-G and type /usr/local/bin. Once you've navigated to that folder in Finder, it will appear in the 'Recent Places' list when you drop down the path in the open dialog. I'll try to make this work better in future if you only have the homebrew version.

0 votes
Steven Mitcham April 11, 2012

I can't select it, in the browse dialog the /usr directory doesn't show up. I'm guessing that this directory is only accessible from the unix-like side of OSX.

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2012

What happens when you try to select it? I know of a number of people have used Homebrew's git before although I don't have it installed myself.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events