Environment: Mac OSX 10.10. When I was trying to use gitk
, it shows:
Coda-2:~ Coda$ gitk -bash: gitk: command not found
I think the reason is the old version of git
. Here is some information, and I have already typed brew update
.
Coda-2:~ Coda$ git --version git version 1.9.3 (Apple Git-50) Coda-2:~ Coda$ brew install git Warning: git-2.4.0 already installed, it's just not linked
What is this message: it's just not linked
?
Furthermore, I check the path of git
:
Coda-2:~ Coda$ which git /usr/bin/git
It should be in /usr/bin/local/git
? How to fix it?
I figure it out, thank @TimCastelijns.
brew doctor
said:
Warning: You have unlinked kegs in your Cellar Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: git
So, I typed:
Coda-2:~ Coda$ brew link git Linking /usr/local/Cellar/git/2.4.0... 220 symlinks created
Then I typed gitk
, and it worked and the path changed to /usr/local/bin/git
. However, when I want to check the version of git
. It still showed the old version, why?
Coda-2:~ Coda$ git --version git version 1.9.3 (Apple Git-50)
Gitk is a graphical repository browser. It was the first of its kind. It can be thought of as a GUI wrapper for git log . It is useful for exploring and visualizing the history of a repository. It's written in tcl/tk which makes it portable across operating systems.
Gitk was the first graphical repository browser. It's written in tcl/tk. gitk is actually maintained as an independent project, but stable versions are distributed as part of the Git suite for the convenience of end users.
To run gitk, type gitk in your command line or terminal. To run git-gui, type git gui instead.
I just installed the latest version of git via homebrew on macos.
11:28 $ git --version git version 2.25.0
It doesn't seem to have gitk and git gui so I noticed the answer for linux and tried to install the same package git-gui
via homebrew and it worked.
brew install git-gui
Found the bug here.
I'm running macos 10.14.5 Mojave.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With