No gitk in your OSX?

Source: Internet
Author: User

There's no gitk in your OSX. Bottom line: Your git version is too low, and GITK is installed with Git.

Workaround: Just re-use brew to install Git.

First look at the git version:

andy@andymacbookpro:~$ git--version
git version 1.9.5 (Apple Git-50.3)

You can use brew to reinstall GIT:

First Upgrade Brew:

Brew Update

Then install git:

andy@andymacbookpro:/usr/local/webdata/chrome_ext/fanlihelper$ Brew Install git
==> downloading https:// homebrew.bintray.com/bottles/git-2.6.2.mavericks.bottle.tar.gz
########################################### ############################# 100.0%
==> pouring git-2.6.2.mavericks.bottle.tar.gz
==> Caveats
The OS X Keychain Credential Helper has been installed to:
  /usr/local/bin/git-credential-osxkeychain

the " Contrib "Directory have been installed to:
  /usr/local/share/git-core/contrib

Bash completion have been installed To:
  /USR/LOCAL/ETC/BASH_COMPLETION.D

zsh completion have been installed to:
  /usr/local/share/zsh/ Site-functions
==> Summary
/usr/local/cellar/git/2.6.2:1398 files, 33M

The git version is not changed after installation:

andy@andymacbookpro:/usr/local/webdata/chrome_ext/fanlihelper$ git--version
git version 1.9.5 (Apple Git-50.3)

We use which git, found git directory or/usr/bin/git, supposedly git should be located in/usr/local/bin/git, is the directory is not set in profile, so we first upgrade brew:

Brew Upate

Finally, we found this tip:

Consider setting your PATH so that/usr/local/bin
occurs before/usr/bin. Here is a one-liner:
    echo ' Export path= '/usr/local/bin: $PATH ' >> ~/.bash_profile

Then we follow the prompts to execute:

echo ' Export path= '/usr/local/bin: $PATH ' >> ~/.bash_profile

Reference () Here, so to speak:

If you already has git installed via homebrew, you can just do upgrade:

In other words, we have just brew install git, and now we have imported the path, we can directly:

Brew upgrade Git is available with the following effects:

$ which git
/usr/bin/git
$ brew upgrade git
$ which git
/usr/local/bin/git

Then we see that the git version is correct:

andy@andymacbookpro:/usr/local/cellar/git/2.6.2$ git version
git version 2.6.2

And then we can execute GITK in the shell.

Finally, let's look at the situation in the system:

andy@andymacbookpro:/usr/local/cellar/git/2.6.2$/usr/bin/git version
git version 1.9.5 (Apple Git-50.3)
andy@andymacbookpro:/usr/local/cellar/git/2.6.2$ git version
git version 2.6.2
andy@andymacbookpro:/usr/ local/cellar/git/2.6.2$ which git
/usr/local/bin/git
andy@andymacbookpro:/usr/local/cellar/git/2.6.2$ Which gitk
/usr/local/bin/gitk
andy@andymacbookpro:/usr/local/cellar/git/2.6.2$

You can see that we currently have two git in OSX, and GITK is in the/usr/local/bin/directory.

Reference:
Http://stackoverflow.com/questions/17582685/install-gitk-on-mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.