Beginner's tool use (ix)--git How to perform a branch merge operation

Source: Internet
Author: User

Today we continue our git tutorial, the Git Killer feature is for branch management, so today it's about the merge operation between branches. Merge can be said to be one of our most frequently used operations, and a merge operation typically contains commit, pull, push, and so on. Used to use the SVN's friends may feel git operation is very troublesome, in fact, git commonly used to be so few operations, very simple, very easy to get started. Let's take you to a complete merge operation.


First, the merge operation is done between different branches, if you do not know how to create the branch, then please refer to- "Export maven project from Git." When we modify our branch, we need to Commit the modified part to our Git, right-click the project, Team-->commit:



Then write some notes explaining what was updated this time:


Then, the project will show that there is a local update that needs to be push to the remote server:


Next we'll push the local update, Team-->push:


Then we switch our branch to the target branch (i.e. the branch we want to merge the update to, usually one of our main branches), Team-->switch to, and select the appropriate branch:


Usually after you switch the branch, you need a pull operation to ensure that the branch is the latest version:


The next step is to do our Merge, Team-->merge:


Select the branch that we have just modified, and then merge:


OK, here we complete a merge operation, when we usually switch back to the previous branch, then merge the main branch into our branch, make sure our current code is the latest version, and proceed with the following development.


Git's management of the branch is great, making our code management very handy, believing you'll love git once you've used it.




Beginner's tool use (ix)--git How to perform a branch merge operation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.