git基本操作以及分支问题
仅有的幸福
仅有的幸福 2017-05-02 09:51:49
0
2
683

想问git一些基本问题 ,我有个项目,公共部分放到master,定制的功能放到分支,
我平日都会在master上修改公共部分,更新时希望分支也能修改,但是就是更新的时候经常conflict
我的操作步骤是:master上先提交 git add .=>git commit -am 'xx'=>git push -u origin master
然后就把公共部分新的内容更新到分支:git branch 分支=>git pull=>git merge
git pull的时候就已经报了confict请问正确的步骤应该是?

仅有的幸福
仅有的幸福

reply all(2)
洪涛

There will definitely be conflicts according to your process. You can only go to the both modified files to manually fix the conflicts, and then submit them again.

洪涛

If you change a file on the master branch, and then you change the file on another branch, there will be a conflict when you merge.

Or resolve the conflict, git add, git rebase --continue;

Or merge branches every day, this way there will be a lot less conflicts

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!