Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I access the 'GitHub for Mac' command-line utility from the terminal?

I recently installed GitHub for Mac, the graphical Git client from GitHub, and also the command-line utility from its menu, shown below:

GitHub for Mac menu

I was notified the command-line utility had been installed in /usr/local/github, but when I checked it had actually been put in /usr/local/bin/github - details shown below:

Terminal results

When I try to run git I get -bash: git: command not found, so I added export PATH=/usr/local/bin:$PATH to ~/.profile thinking it would solve the issue, but it hasn't - all that seems to be different is I can now start GitHub for Mac from the terminal by typing github.

Please could someone with more knowledge explain what's happening here?

like image 646
Check12 Avatar asked Oct 27 '12 12:10

Check12


People also ask

How do I access GitHub from terminal?

Open Terminal. To launch GitHub Desktop to the last opened repository, type github . To launch GitHub Desktop for a particular repository, type github followed by the path to the repository. You can also change to your repository path and then type github . to open that repository.

How do I know if git is installed on Mac terminal?

Before you install Git, it's a good idea to check to see if you already have it installed. To do so, simply open a terminal window and type "git --version" and press Enter.


2 Answers

The "GitHub for Mac" command-line utility is just a tool for launching "GitHub for Mac" in the current directory.

To install the git command line tool use either Homebrew (brew install git) or the Git for OS X installer.

like image 127
Stefan Avatar answered Sep 26 '22 17:09

Stefan


From May 2013, you now have a different option:

See "Installing Git from GitHub for Mac"

you can now easily install Git for use on the command line, without needing to download any separate packages.
And whenever we update the version of Git included with GitHub for Mac, you'll get the changes automatically – no work required on your part!

you may notice some changes to the Preferences window.
On the newly renamed "Advanced" tab, simply click "Install Command Line Tools".

click install

You'll be prompted for an administrator password so that Git can be installed into /usr/local/bin, and then you should very shortly see that it succeeded:

enter image description here

like image 30
VonC Avatar answered Sep 23 '22 17:09

VonC