1. 程式人生 > >failed to push some refs to 'https://gitee.com/ftl_663/java-shop.git'

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