Xcode 4安装git吗? [英] Does Xcode 4 install git?

查看:144
本文介绍了Xcode 4安装git吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我买了一台新的MacBook Pro,并按顺序安装了下面的应用程序列表。在我的旧MacBook上,也运行OS X 10.6.6,我没有 / usr / bin / git ,但是,在新款MacBook Pro上,我确实是这样。我可以想到的两个系统之间唯一的区别是:


  1. 新款MacBook Pro在老款MacBook上拥有Xcode 4与Xcode 3, / li>
  2. 新MacBook Pro使用 homebrew 与安装的旧MacBook安装了git [git-osx-安装程序] []

自制软件将git 1.7.4.1安装到 / usr / local / Cellar / git 中并将其符号链接到 / usr / local / bin 。这使我相信Xcode 4在 / usr / bin 中安装了 git 1.7.3.4。任何人都可以确认或否认这一点?



如果Xcode 4没有将git 1.7.3.4安装到 / usr / bin ,任何想法程序做了什么?



应用程序按顺序安装




  • 启动

  • 冉苹果软件更新

  • 运行Bootcamp为Windows 7创建48GB NTFS分区
  • 安装iWork '09并运行软件更新以安装iWork Update 5
  • 安装了TextExpander 3.2.4

  • 安装了Dropbox 1.0.20

  • 安装1Password 3.5.9

  • 安装了Alfred 0.8.2(107) 安装了Adium 1.4.1

  • 通过App Store开始安装Xcode4

  • 通过App Store安装Caffeine 1.1.1
    通过App Store安装Kindle
  • >
  • 通过App Store完成Xcode 4的安装

  • 使用以下命令安装Homebrew:
    ruby​​ -e$( curl -fsSLk https://gist.github.com/raw/323731/install _homebrew.rb)

  • 安装的git使用 brew install git

  • 使用 brew install macvim



  • 更新:包裹收据信息



    我跑过了 pkgutil - file-info / usr / bin / git 并显示以下信息。这似乎导致Xcode 4。

     卷:/ 
    路径:/ usr / bin / git

    pkgid:com.apple.pkg.GitLeo
    pkg-version:4.0.0.9000000000.1.1248867338
    install-time:1300459157
    uid:0
    gid:0
    模式:755



    为什么这是Xcode 4安装git的问题



    默认情况下,路径 / usr / local / bin 位于 / usr / bin (参见文件 / etc / paths )。这意味着使用git 1.7.3.4而不是使用Homebrew安装的1.7.4.1。 是的,它的确如此。我刚完成了Xcode 4的安装。 git以前安装到/ usr / local / git。



    我是OS X的新手,只能建议交换/ etc /路径中这些目录的顺序。



    不知道还有什么可以工作。


    I bought a new MacBook Pro and installed the applications list below in order. On my old MacBook, also running OS X 10.6.6, I didn't have /usr/bin/git, however, on the new MacBook Pro, I do. The only differences that I can think of between the two systems are:

    1. New MacBook Pro has Xcode 4 vs. Xcode 3 on old MacBook
    2. New MacBook Pro installed git using homebrew vs. old MacBook installed [git-osx-installer][]

    Homebrew installed git 1.7.4.1 into /usr/local/Cellar/git and symlinked it into /usr/local/bin. This leads me to believe that Xcode 4 installed git 1.7.3.4 into /usr/bin. Can anyone confirm or deny this?

    If Xcode 4 didn't install git 1.7.3.4 into /usr/bin, any thoughts what program did?

    Applications Installed in Order

    • First boot
    • Ran Apple's Software Update
    • Ran Bootcamp to create 48GB NTFS partition for Windows 7
    • Installed iWork '09 and ran software update to install iWork Update 5
    • Installed TextExpander 3.2.4
    • Installed Dropbox 1.0.20
    • Installed 1Password 3.5.9
    • Installed Alfred 0.8.2 (107)
    • Installed Adium 1.4.1
    • Started installation of Xcode4 via App Store
    • Installed Caffeine 1.1.1 via App Store
    • Installed Kindle via App Store
    • Completed installation of Xcode 4 via App Store
    • Installed Homebrew using the following command: ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
    • Installed git using brew install git
    • Installed MacVim using brew install macvim

    Update: Package Receipt Info

    I ran pkgutil --file-info /usr/bin/git and the following info was displayed. This appears to incriminate Xcode 4.

    volume: /
    path: /usr/bin/git
    
    pkgid: com.apple.pkg.GitLeo
    pkg-version: 4.0.0.9000000000.1.1248867338
    install-time: 1300459157
    uid: 0
    gid: 0
    mode: 755
    

    Why It's a Problem that Xcode 4 Installs git

    By default, the path /usr/local/bin is after /usr/bin (see the file /etc/paths). This means that git 1.7.3.4 is used instead of 1.7.4.1 that Homebrew installed.

    解决方案

    Yes, it does. I just finished the Xcode 4 install. git was previously installed to /usr/local/git.

    I am new to OS X, and can only suggest swapping the order of those directories in /etc/paths.

    Not sure what else would/might work.

    这篇关于Xcode 4安装git吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆