Git第一次提交到远程

问题

远程创建仓库后,第一次push到远程,本地提示

Updates were rejected because the remote contains work that you do

解决

使git允许合并不相关的历史,使用命令

  1. git pull origin master --allow-unrelated-histories
posted @ 2021-11-09 23:48  往事随雨  阅读(36)  评论(0)    收藏  举报