Git: Push rejected 的解决方案
Push rejected: Push to origin/master was rejected
首先,git init (在工程文件夹下)
git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url>
即:(针对问题 Your local changes to the following files would be overwritten by merge)
git remote add <name> <url>
用如下命令检验:
git remote -v
然后:
git pull origin master --allow-unrelated-histories git pull origin master
接下来即可push和pull
如果这篇文章帮助到了你,你可以请作者喝一杯咖啡