针对Merge remote-tracking branch 'origin/develop'的认识,我也不是很清楚,看过几篇文章但对我的问题也没有解决。就自己想了一个曲线救国的思路。
1、下图的idea中git log的情况,每次在合并main分支的时候都回出现Merge
2、其他文章提到的解决方案
# download the latest commits (更新本地远程所有分支commit记录)
git remote update -p
# update the local branch (更新本地分支)
git merge --ff-only @{u}
# if the above fails with a complaint that the local branch has
# diverged: (如果上述报错说本地分支出现冲突,这样解决)
git rebase -p @{u}
3、我的问题最终解决方案
1)新建文件夹,重新拉取git仓库最新代码, git clone xxxxx
2)新建develop分支,修改内容,commit
3)push,这时候就会出现过往的Merge remote-tracking branch 'origin/develop‘ 记录,提交
4)合并main分支
5)后续的提交就不会再出现Merge remote-tracking branch 'origin/develop‘了