Github-默认master改为main引发的问题
将master的代码合并到main(现今默认)
pull request冲突:
-
#查看源
git remote -v

? 如只有fork的仓库,没有上游仓库.
#获取源仓库,upstream为源仓库创建的名称
#https的为源仓库的链接
git remote add upstream https://github.com/xxx.git
-
出现四个地址成功. #获取源地址资源,upstream为源仓库创建的名称
git fetch upstream

- 合并取回的目标分支(例中为main)代码到本地当前分支

问题: 不相关的历史commit导致冲突: 在pull request 不会出现 able to merge
解决方法:

- 因为有冲突文件,所有需要合并冲突

- 查看状态,出现绿色记录(冲突解决)

- 接着

- 最后

there isn’t anything to compare 消失

成功create a pull request!!!
参考文献
- (https://blog.csdn.net/weixin_40948587/article/details/109790023)
- 还有一个链接找不到了233…深感抱歉!
|