使用GitHub Desktop Version 3.3.3 (x64),感觉非常弱智,当库添加其他云连接比如gitCode, gitee,同步到国内的云库上:
比如:
git remote add gitee https://gitee.com/XXX/xxx.git
git remote add gitcode https://gitcode.com/XXX/xxx.git
之类的远程库URL后,GitHub Desktop->Repository->Repository Settings...
中的 Primary remote repository(urlName)会变! 而且
这个问题时有时无,莫名其妙!!!GitHub Desktop没找到相关设置!!!!!
用git remote -v 可见,按字母大小排列顺序,小的排前面,比如 gitcode就会排最前面,
变成了Primary remote repository(gitcode),内容ULR也变成gitcode的。从而向gitHub.COM推送不成功。
为了解决这个问题,把gitHub.com URL用a命名,一般就排在最前面了。
git remote add a https://github.com/XXX/xxx.git
GitHub Desktop才能正确push 到 GitHub.com里
时有时无,处了这个规律,还没找到其他规律,莫名其妙
浪费了我一个下午