当前位置: 技术问答>linux和unix
谁懂git 命令啊,帮我改个shell
来源: 互联网 发布时间:2017-05-03
本文导语: shell 内容 。。。 if [ "$NONETWORK" != "yes" ]; then if ! [ -e MediaLibraryKit ]; then git clone git://git.videolan.org/MediaLibraryKit.git cd MediaLibraryKit git checkout -B localAspenBranch ${TESTEDMEDIALIBRARYKITHASH} git branch --set-upstream-to=origin/...
shell 内容
。。。
if [ "$NONETWORK" != "yes" ]; then
if ! [ -e MediaLibraryKit ]; then
git clone git://git.videolan.org/MediaLibraryKit.git
cd MediaLibraryKit
git checkout -B localAspenBranch ${TESTEDMEDIALIBRARYKITHASH}
git branch --set-upstream-to=origin/master localAspenBranch
cd ..
else
cd MediaLibraryKit
git pull --rebase
git reset --hard ${TESTEDMEDIALIBRARYKITHASH}
cd ..
fi
if ! [ -e VLCKit ]; then
git clone git://git.videolan.org/vlc-bindings/VLCKit.git
cd VLCKit
git checkout -B localAspenBranch ${TESTEDVLCKITHASH}
git branch --set-upstream-to=origin/master localAspenBranch
cd ..
else
cd VLCKit
git pull --rebase
git reset --hard ${TESTEDVLCKITHASH}
cd ..
fi
。。。
执行的时候错误为:
Switched to a new branch 'localAspenBranch'
error: unknown option `set-upstream-to=origin/master'
git version
bogon:ios jiang$ git --version
git version 1.7.12.4 (Apple Git-37)
好像是我的git 版本低,不支持`set-upstream-to=origin/master' ,,但不知道怎么改脚本
哪位大侠帮我改下,谢谢了
。。。
if [ "$NONETWORK" != "yes" ]; then
if ! [ -e MediaLibraryKit ]; then
git clone git://git.videolan.org/MediaLibraryKit.git
cd MediaLibraryKit
git checkout -B localAspenBranch ${TESTEDMEDIALIBRARYKITHASH}
git branch --set-upstream-to=origin/master localAspenBranch
cd ..
else
cd MediaLibraryKit
git pull --rebase
git reset --hard ${TESTEDMEDIALIBRARYKITHASH}
cd ..
fi
if ! [ -e VLCKit ]; then
git clone git://git.videolan.org/vlc-bindings/VLCKit.git
cd VLCKit
git checkout -B localAspenBranch ${TESTEDVLCKITHASH}
git branch --set-upstream-to=origin/master localAspenBranch
cd ..
else
cd VLCKit
git pull --rebase
git reset --hard ${TESTEDVLCKITHASH}
cd ..
fi
。。。
执行的时候错误为:
Switched to a new branch 'localAspenBranch'
error: unknown option `set-upstream-to=origin/master'
git version
bogon:ios jiang$ git --version
git version 1.7.12.4 (Apple Git-37)
好像是我的git 版本低,不支持`set-upstream-to=origin/master' ,,但不知道怎么改脚本
哪位大侠帮我改下,谢谢了
|
git checkout -B localAspenBranch ${TESTEDMEDIALIBRARYKITHASH}
git branch --set-upstream-to=origin/master localAspenBranch
上面两句改成:
git checkout -b localAspenBranch --track origin/master