error: failed to push some refs to 'github.com:18476305640/wx-music.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
1)這個情況是我項目已經完成后想push到github上,於是就在github在創建了一個,且加入了 README.md ,導致無法push上去,當然你可以push到新創建的分支上。比如main分支不行,且存在一個main分支,可以git push origin master,
但如果你想在存在沖突的main上,可以在push上加-f 強行覆蓋遠程倉庫:
git push -f origin [遠程的哪個分支]
如有錯誤,歡迎指定!