Rebasing a local branch from develop

被刻印的时光 ゝ 提交于 2020-06-10 04:58:26

问题


I want to rebase a feature branch from develop. I am using PhpStorm Git integration and I have 2 different develop branches:

refs/remotes/origin/develop
refs/heads/develop

In order to do not mess up things, which one do I have to choose to rebase?


回答1:


I don't know the phpstorm interface for Git, but in the command line I'd do the following:

  • git checkout develop
  • git pull origin develop -> this fetches the remote version of the develop branch and merges it (or rebases it, depending on your pull strategy) into/onto your local branch. This way the local and the remote versions of develop are the same
  • git checkout feature-brach
  • git rebase develop

If there are any conflicts - resolve them. After that you can create a pull request against develop.



来源:https://stackoverflow.com/questions/50736080/rebasing-a-local-branch-from-develop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!