After upgrading to OSX 10.10 Yosemite Beta, running git pull
is returning the following error:
/Library/Developer/CommandLineTools/usr/li
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.
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.
There is an update to git-rebase.sh
https://github.com/git/git/pull/110/files
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!
Downloading the newest version of iTerm2 fixed this for me!
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/.