New branches were intellij idea on a new idea git branch branch branch, submit branching, merging branches into the trunk, remove the branch, the branch management

Now in the mainstream of JAVA development ide, idea usage has exceeded the eclipse, so grasp the essential idea of ​​the operation.

Git branch is an important function, you can make different teams through their branch operations, consolidated on key nodes, usually without disturbing each other, and when individuals and teams can work in parallel, or that different functional parallelism forward. (Online copy of this sentence)

1. Create a new branch

 

1.1 According to the menu selection

 

1.2 Select New branch

 

 

1.3 input branch name

 

The following represents a checkout branch checked after the new switching points directly to the appropriate branch. Do not check the default current branch

 

Now there are two local branches

 

 

2. Submit to a remote server

Push the new branch can be submitted directly to the remote repository, you can submit a new file, we have to demonstrate the effect, created a new file

2.1 We create a new file in the TestBranch branch

 

 

We create some text

 

 

 

2.2 We commit this file to TestBranch branch

 

 

We will be submitted to the local branch of the current file

2.3 We cut back to see if there is a local master this document

 

 

Checkout After selecting the local branch

 

 

We found that there is no master branch of this document.

2.4 submit to a remote repository

We cut back to TestBranch first branch after branch, select PUSH operation

 

 

 

 

We will TestBranch and documents submitted with the remote repository

 

Success Tips

We look at the branches (another idea in the lower right corner)

 

You can see the local and remote have two of our branches

If someone else is new remote branch you want to synchronize to a local

Select the back of the remote branch Triangle

 

 

I related to it because there is no remote repository synchronized, normal should be Checkout as new local branch 

 

 

(Pirates of the online map)

The branch remote repository, checked out to the local warehouse

 

3. Merge Branches

It refers to the combined effect of the commit current branch to another branch up. For example, to modify the TestBranch also acts on the master branch, it is necessary to switch to the Master branch, click merge TestBranch branch. Note Select "Remote Branches" of TestBranch, so small changes on the local TestBranch will not be imported. After the completion of the merger can be deleted branch can continue working on a branch and then merge when needed

Switch to the master branch 3.1

 

 

3.2 Select merge merging branches

 

Completion of the merger, we can see the file we merged in the master

 

 

But not yet finished, but we will master the local branch of our TestBranch branches merge, and did not submit to a remote branch, need to Push it,

 

 

 

Submitted successfully

So our new branch, branch switching, merging branches is complete

We can own version of the idea management tool to view historical submit specific use of its own research it, will not be discussed

 

4. Delete branch

 

 

We will merge the code of local and remote branches can be deleted

We can see the operation of record remote repository

 

 

Now we can be developed on the new branch.

I wish everybody a lot of guidance
---------------------
Author: H H whirring
Source: CSDN
Original: https: //blog.csdn.net/dasini321/article / details / 84427406
copyright: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/xinglongbing521/p/11021862.html