简体   繁体   English

Git rebase 我必须在 rebase 后拉

[英]Git rebase I have to pull after rebase

I have 2 branches我有2个分支

master: mainfile, file1主:主文件,文件1

feature-branch: mainfile, file2功能分支:主文件,文件 2

Then I do:然后我做:

git fetch

next下一个

git checkout feature-branch

next下一个

git rebase -i master

Then I squash all commits from feature-branch and resolve conflicts in mainfile.然后我从特性分支中压缩所有提交并解决主文件中的冲突。 After this I have on feature-branch在此之后,我在功能分支上

mainfile, file1, file2主文件,文件1,文件2

and then I have to git pull .然后我要git pull After pull I have to resolve all conflicts from master for all commits in file1.拉出后,我必须为 file1 中的所有提交解决来自 master 的所有冲突。

Why I have to pull and resolve conflicts in second rebase if after first rebase i have all changes from master in feature-branch and before rebase all my branches are up to date?如果在第一次 rebase 之后我在 feature-branch 中拥有 master 的所有更改并且在 rebase 之前我的所有分支都是最新的,为什么我必须在第二次 rebase 中提取和解决冲突?

OK, I had wrong config.好的,我有错误的配置。 When I changed git config pull.rebase true to git config pull.rebase false it works now.当我将git config pull.rebase true更改为git config pull.rebase false时,它现在可以工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM