Foreword
In front of a branch has been created with the pycharm, when we developed the code on a branch, code, test code is no problem on the need to branch into the master branch.
This ensures that the master branch code is always up to date, is the most clean, so that it can continue to develop their own projects. Benpian explain how to use pycharm merge their branches.
View current branch
Open pycharm-VCS-Git-Branches, looking at branches of the current project
You can see from the chart, the current item branch is: yoyoketang
Submit branch code
Add some code on yoyoketang: in the current branch
The new code commit and then push to yoyoketang branch
You can see the files on yoyoketang branch test_yoyoketang.py push has been successful, but did not master branch, next put yoyoketang branch into the master branch.
merge merging branches
First check the master branch is not test_yoyoketang.py file.
Pycharm the first VCS-Git-Branches-Checkout to the master branch
Open the VCS-Git-Merge Changes
Branches to merge option from inside the box to select the desired consolidation of branch without leading remotes / is a local branch with remotes / remote branch.
Where the election of yoyoketang local branch and remotes / yoyoketang can, as has already been passed push
After the merge point you can see, there is a new test_yoyoketang.py Created file, a Updated before updating the code.
At this point the code has been merged into the master branch on (this time just merged local warehouse, did not merged into the remote repository).
Then the next push will be pushed to the remote repository
After a successful push to open the web page remote repository to view the master branch, you will find have been merged successfully