更新推送脚本
This commit is contained in:
		
							parent
							
								
									903cf0b28a
								
							
						
					
					
						commit
						8a74c52a9d
					
				@ -1,17 +1,19 @@
 | 
			
		||||
echo '开始推送github'
 | 
			
		||||
echo '切换git地址'
 | 
			
		||||
git remote rm origin
 | 
			
		||||
git remote add origin 'git@github.com:hongyehuicheng/lilishop.git'
 | 
			
		||||
git pull remote master
 | 
			
		||||
git push origin master --force
 | 
			
		||||
if [ "$?" = "0" ]
 | 
			
		||||
then
 | 
			
		||||
echo -e "\033[42;34m push to github success! \033[0m"
 | 
			
		||||
else
 | 
			
		||||
echo -e "\033[41;30m push to github fail! \033[0m"
 | 
			
		||||
exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
git remote rm origin
 | 
			
		||||
 | 
			
		||||
git remote add origin git@github.com:hongyehuicheng/lilishop.git
 | 
			
		||||
echo '设置上传代码分支,推送github'
 | 
			
		||||
git push --set-upstream origin master
 | 
			
		||||
echo '推送github完成'
 | 
			
		||||
git remote rm origin
 | 
			
		||||
git remote add origin 'git@gitee.com:beijing_hongye_huicheng/lilishop.git'
 | 
			
		||||
 | 
			
		||||
git remote add origin git@gitee.com:beijing_hongye_huicheng/lilishop.git
 | 
			
		||||
echo '切回gitee资源'
 | 
			
		||||
git branch --set-upstream-to=origin/master master
 | 
			
		||||
echo '设置git跟踪资源'
 | 
			
		||||
sleep 1
 | 
			
		||||
echo '更新代码'
 | 
			
		||||
git pull
 | 
			
		||||
git pull remote master
 | 
			
		||||
 | 
			
		||||
git branch --set-upstream-to=origin/master master
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user