你的osx中没有gitk?
2015-10-19 14:14
423 查看
你的osx中没有gitk?一句话:你的git版本太低了,gitk是跟随git一起安装的。
解决办法:重新使用brew安装git就好了。
先看下git版本:
可以使用brew重新安装git:
首先升级brew:
brew update
然后安装git:
安装之后发现git版本还是没有变:
我们使用which git,发现git的目录还是/usr/bin/git,按理git应该位于/usr/local/bin/git中才对,是目录在profile中没有设置好,所以我们先升级brew:
最后发现有此提示:
然后我们根据提示来执行:
参考()这里,这么说的:
If you already have git installed via homebrew, you can just do upgrade:
也就是说,刚刚我们已经brew install git过了,我们现在导入了path之后,我们可以直接:
brew upgrade git就可以了,效果如下:
之后我们看到git版本正确了:
然后我们这时候在shell中执行gitk也可以了~~
最后我们看一下系统中的情况:
可以看到目前我们osx中有两个git,而gitk也在/usr/local/bin/ 目录下。
参考:
http://stackoverflow.com/questions/17582685/install-gitk-on-mac
解决办法:重新使用brew安装git就好了。
先看下git版本:
[code]andy@AndyMacBookPro:~$ git --version git version 1.9.5 (Apple Git-50.3)
可以使用brew重新安装git:
首先升级brew:
brew update
然后安装git:
[code]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 has been installed to: /usr/local/share/git-core/contrib Bash completion has been installed to: /usr/local/etc/bash_completion.d zsh completion has been installed to: /usr/local/share/zsh/site-functions ==> Summary /usr/local/Cellar/git/2.6.2: 1398 files, 33M
安装之后发现git版本还是没有变:
[code]andy@AndyMacBookPro:/usr/local/webdata/chrome_ext/fanlihelper$ git --version git version 1.9.5 (Apple Git-50.3)
我们使用which git,发现git的目录还是/usr/bin/git,按理git应该位于/usr/local/bin/git中才对,是目录在profile中没有设置好,所以我们先升级brew:
[code]brew upate
最后发现有此提示:
[code]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
然后我们根据提示来执行:
[code]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就可以了,效果如下:
[code]$ which git /usr/bin/git $ brew upgrade git $ which git /usr/local/bin/git
之后我们看到git版本正确了:
[code]andy@AndyMacBookPro:/usr/local/Cellar/git/2.6.2$ git version git version 2.6.2
然后我们这时候在shell中执行gitk也可以了~~
最后我们看一下系统中的情况:
[code]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$
可以看到目前我们osx中有两个git,而gitk也在/usr/local/bin/ 目录下。
参考:
http://stackoverflow.com/questions/17582685/install-gitk-on-mac
相关文章推荐
- android 控件的焦点
- iBatis 中 Like 的写法实现模糊查询
- linux下利用shell脚本随机生成密码
- 杂记-bug集锦
- 为什么平台数据库名及表名要统一用大写?
- [Leetcode] [Database] Second Highest Salary解题
- Google perf tools for nginx
- HTML获取URL传递的参数
- SharePoint 2013 IT Professional-- Backup Web Application
- HIVE分析窗口函数:SUM,AVG,MIN,MAX
- 操作系统与网络实现 之四
- OpenHW12手记--Qt网络服务(TCP UDP)的建立
- 文章标题
- 组装电脑必看知识之处理器CPU参数的认识
- java-测试synchronized使用xxx.class和this使用的区别
- 几百万人都不知道的互联网思维下的3个节日营销计谋
- Windows下Apache服务器中自动配置二级子域名
- tomcat下发布
- 豆浆机改装记(1): Android BLE框架
- JDBC操作数据库的增加、删除、更新、查找实例分析