你的osx中没有gitk?
来源:互联网 发布:淘宝网藏族服装 编辑:程序博客网 时间:2024/05/20 05:24
你的osx中没有gitk?一句话:你的git版本太低了,gitk是跟随git一起安装的。
解决办法:重新使用brew安装git就好了。
先看下git版本:
andy@AndyMacBookPro:~$ git --versiongit version 1.9.5 (Apple Git-50.3)
可以使用brew重新安装git:
首先升级brew:
brew update
然后安装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==> CaveatsThe OS X keychain credential helper has been installed to: /usr/local/bin/git-credential-osxkeychainThe "contrib" directory has been installed to: /usr/local/share/git-core/contribBash completion has been installed to: /usr/local/etc/bash_completion.dzsh completion has been installed to: /usr/local/share/zsh/site-functions==> Summary/usr/local/Cellar/git/2.6.2: 1398 files, 33M
安装之后发现git版本还是没有变:
andy@AndyMacBookPro:/usr/local/webdata/chrome_ext/fanlihelper$ git --versiongit version 1.9.5 (Apple Git-50.3)
我们使用which git,发现git的目录还是/usr/bin/git,按理git应该位于/usr/local/bin/git中才对,是目录在profile中没有设置好,所以我们先升级brew:
brew upate
最后发现有此提示:
Consider setting your PATH so that /usr/local/binoccurs before /usr/bin. Here is a one-liner: echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
然后我们根据提示来执行:
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
参考()这里,这么说的:
If you already have git installed via homebrew, you can just do upgrade:
也就是说,刚刚我们已经brew install git过了,我们现在导入了path之后,我们可以直接:
brew upgrade git就可以了,效果如下:
$ which git/usr/bin/git$ brew upgrade git$ which git/usr/local/bin/git
之后我们看到git版本正确了:
andy@AndyMacBookPro:/usr/local/Cellar/git/2.6.2$ git versiongit version 2.6.2
然后我们这时候在shell中执行gitk也可以了~~
最后我们看一下系统中的情况:
andy@AndyMacBookPro:/usr/local/Cellar/git/2.6.2$ /usr/bin/git versiongit version 1.9.5 (Apple Git-50.3)andy@AndyMacBookPro:/usr/local/Cellar/git/2.6.2$ git versiongit version 2.6.2andy@AndyMacBookPro:/usr/local/Cellar/git/2.6.2$ which git/usr/local/bin/gitandy@AndyMacBookPro:/usr/local/Cellar/git/2.6.2$ which gitk/usr/local/bin/gitkandy@AndyMacBookPro:/usr/local/Cellar/git/2.6.2$
可以看到目前我们osx中有两个git,而gitk也在/usr/local/bin/ 目录下。
参考:
http://stackoverflow.com/questions/17582685/install-gitk-on-mac
0 0
- 你的osx中没有gitk?
- osx中没有gitk?
- Mac osx中使用gitk
- osx中终端里面没有运行.bashrc的原因
- osx中终端里面没有运行.bashrc的原因
- 解决OSX Yosemite中没有 /usr/include
- gitk的使用
- gitk命令的作用
- Gitk
- osx中Grapher的使用
- Mac OSX的Apache无法启动,没有错误提示
- osx中安装atom遇到的问题
- 如果生命中没有你
- Mac Retina解决gitk模糊的问题
- 解决gitk显示中文乱码的问题
- gitk 标签显示中文乱码的问题
- 没有你是孤独的
- 真的没有很想你
- 杂记-bug集锦
- Nginx停止、卸载、configure配置
- Android文本框中加入html
- C语言预处理命令之条件编译(#ifdef,#else,#endif,#if等)
- 目标
- 你的osx中没有gitk?
- 为什么ScrollView 不要嵌套ListView
- 中文乱码的原因及解决方法
- java用正则表达式判断字符串中是否仅包含英文字母、数字和汉字
- 修复Win10任务栏开始菜单等系统图标无法点击问题
- Qt学习之路_4(Qt UDP的初步使用)
- ListView getView() 详解
- Spring自带mock测试Controller
- LeetCode Count Primes