首先在码云上创建一个仓库:
然后使用命令符git remote add origin git@项目地址.git来完成导入
然后使用git push来将当前分支master推送到远程
git push -u origin master 使用 -u将本地的master分支推送到远程的master分支中,还会将本地的master与远程的master分支关联起来。
如果出现这样的情况:
那么说明远程分支上存在本地分支中不存在的提交
使用命令符git push -f强制覆盖即可
然后就成了。
查看我们的码云远程仓库
果然成功了