Git——rebase实际操作遇到的问题

当我们在自己的分支myDevelopBranch上开发完一个任务之后,需要合并到主分支上Develop上,可能会遇到这样的提示

 

这个时候就需要我们在终端命令工具中操作(这样是比较靠谱和安全的)

git checkout develop
git pull
git checkout 你的 branch
git rebase develop
git push
git push --force      强制覆盖

效果如下:

 git rebase develop 解决冲突

如果在git rebase develop之后报出

error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.

这种提示,就是有需要合并的两个分支中存在冲突的地方,需要你去更改和确认

解决完之后,继续执行git rebase develop,之后报出

First, rewinding head to replay your work on top of it...
Applying: fix UI then videos null date
Applying: second fix UI then videos null date

相关提示,则是冲突解决完成

 

 

 

 

posted on 2020-10-21 18:23  在一起的浅蓝色  阅读(1163)  评论(0编辑  收藏  举报

导航