Install gitk on Mac

Does anyone know how to install gitk on Mac?

From their official website, it seems gitk comes with git, but the version of my git ( git version 1.7.12.4 (Apple Git-37) ) does not come with gitk.

brew install gitk does not work for gitk.

Version info (copied from comments):

  • OS X 10.8.2 (12C2034) "Mountain Lion"
  • XCode Version 4.6 (4H127)

  • Correct, the 1.7.12.4 (Apple Git-37) does not come with gitk. You can install a more recent version of git which comes with gitk by using brew. More thorough instructions located here: http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/

    Run the following commands at the terminal:

    brew update
    brew install git
    

    If you get an error indicating it could not link git, then you may need to change permissions/owners of the files it mentions.

    Once completed, run:

    type -a git
    

    And make sure it shows:

    /usr/local/bin/git
    

    If it does not, run:

    brew doctor
    

    And make the path change to put /usr/local/bin earlier in the path. Now, gitk should be on your path (along with an updated version of git).


    I just had the same problem and solved it as follows:

  • Download the official git package for Mac from http://git-scm.com/download/mac
  • Install the package. This places all the binaries in /usr/local/git/bin.
  • Optionally run the included script to make gitk accessible outside of terminals
  • Either add /usr/local/git/bin to your PATH or use an alias ( alias gitk='/usr/local/git/bin/gitk' )

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

    $ type -a git
    /usr/bin/git
    $ brew upgrade git
    $ type -a git
    /usr/local/bin/git
    

    The one at local/bin will have gitk

    链接地址: http://www.djcxy.com/p/85778.html

    上一篇: 无法在Mac OS X 10.9上安装Lxml

    下一篇: 在Mac上安装gitk