首先要有码云的账号,并记住用户名和密码:
步骤:
可能遇到的问题:
在执行git push -u origin master时:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/olivermeng/octopus_purchase.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.
解决方法:
执行 git pull origin master
在Git pull时遇到:
fatal: refusing to merge unrelated histories
解决方法:
git pull origin master --allow-unrelated-histories
从新执行pull 然后再push 就可以了~