failed to push some refs to 'https://gitee.com/ftl_663/java-shop.git'

1、git init

2、git add .

3、git commit  -m "init"

4、git remote add origin  https://gitee.com/ftl_663/java-shop.git(远程仓库地址)

5、git push -u origin master

提示  failed to push some refs to 'https://gitee.com/ftl_663/java-shop.git'

从网上查到

git pull --rebase origin master

执行语句 git push -u origin master 即可完成代码上传到github

但是还不行 

最后强制上传才可以

git push -u -f origin master

 创建分支 git checkout -b v1.0 origin/master

上传分支  git  push origin HEAD -u

猜你喜欢

转载自www.cnblogs.com/ampl/p/10132292.html