当入手一个新项目完成git clone 'url’以后
执行
git status
git add *
git commit -m “”
git push -u origin master那叫一个行云流水
结果
其实报错的原因在于你没有利用pull 指令来合并项目
执行下面命令问题自然迎刃而解:
git pull origin master --allow-unrelated-histories
git pull origin master
git init
git add .
(没有连接过仓库)
git commit -m
git push -u origin master
(连接过仓库了)
git push
【解決】hint: Updates were rejected because the remote contains work that you do
最新推荐文章于 2024-06-25 16:39:28 发布