OSX 10.10 yosemite beta on git pull: git-sh-setup: No such file or directory

后端 未结 10 2097
醉话见心
醉话见心 2020-12-22 18:33

After upgrading to OSX 10.10 Yosemite Beta, running git pull is returning the following error:

/Library/Developer/CommandLineTools/usr/li

相关标签:
10条回答
  • 2020-12-22 19:11

    Edit your git-pull file and add this line on top of it (just after the comment block)

    PATH="$(dirname $0):$PATH"
    

    Or just copy paste this in your terminal :

    ed -s $(which git-pull) <<< $'6i\nPATH="$(dirname $0):$PATH"\n.\nwq'
    

    Update: As presumed by pilif, since last iTerm2 update (1.0.0.20140629), git-pull run properly without this PATH override.

    0 讨论(0)
  • 2020-12-22 19:11

    UPDATE: still not working with release mentioned below, my mistake. Git push works Git pull doesn't.

    It seems to me that the issue has been fixed by Apple with Mac OS X Yosemite 10.10 (14A329r). i am on the general Beta Yosemite channel (not developer). Git push/pull works as expected again without any modifications.

    0 讨论(0)
  • 2020-12-22 19:12

    There is an update to git-rebase.sh

    https://github.com/git/git/pull/110/files

    0 讨论(0)
  • 2020-12-22 19:20

    Another solution, modify your iTerm2

    cd /Applications/iTerm.app/Contents/MacOS
    mv iTerm iTerm-bin
    
    cat > iTerm <<EOF
    #!/bin/sh
    unset PATH
    \${0}-bin
    EOF
    
    chmod +x iTerm
    

    Done.

    Enjoy your iTerm2 with Yosemite!

    0 讨论(0)
  • 2020-12-22 19:25

    Downloading the newest version of iTerm2 fixed this for me!

    0 讨论(0)
  • 2020-12-22 19:25

    Ubiquill's workaround applies for git rebase (and presumably whichever other functions don't work) as well. In that case, it requires replacing lines 47 and 48 with the following *:

    . /usr/local/Cellar/git/2.0.0/libexec/git-core/git-sh-setup
    . /usr/local/Cellar/git/2.0.0/libexec/git-core/git-sh-i18n
    

    * This path assumes that you have git installed with homebrew, and it lives inside of /usr/local/Cellar/git/2.0.0/.

    0 讨论(0)
提交回复
热议问题