简体   繁体   中英

Pycharm, git: merge from master into branch

I have a master branch master and I've made some changes & commits into a branch called rmurphy . I found something that needs to change in master and want to

  1. Make a change in master
  2. Propagate the changes to branch rmurphy as well
  3. Avoid overwriting the new stuff in branch rmurphy with the old stuff in master . (note there will not be a conflict)
  4. Do it in PyCharm.

The last one is important:I want to learn learn how to work with this IDE to better communicate with my team.

About a week ago, my colleague explained that I would want to "merge master into branch" in this situation. (Unfortunately, this colleague will not be available for some time). But neither that terminology or other variants lead to helpful Google search results. Moreover, I have not found this use-case in my searching through forums and SO. Thanks in advance for your help.

  1. After you have made the change in master , checkout rmurphy .
    • If you haven't already pushed rmurphy to remote

      Git Branches (widget) -> master -> Rebase Current onto Selected

    • Else

      Git Branches -> master -> Merge into Current

For more merge settings use VCS -> Git -> Merge Changes.../Rebase... .

If you don't want to bother, you can always merge instead of rebasing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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