Total Pageviews

2015/01/08

How to get changes from master into branch via egit

Question
 I am working in getDebtSpaceData branch.















Assume the DebtTypeEnum had been updated in master branch
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package gov.nta.dbm.enumeration;

// TODO: Auto-generated Javadoc
/**
 * The Enum DebtTypeEnum.
 */
public enum DebtTypeEnum {

    /** The a. */
    A("A", "公債"),
    /** The b. */
    B("B", "國庫券"),
    /** The c. */
    C("C", "中長借"),
    /** The d. */
    D("D", "短借");

    private String code;
    private String name;

    private DebtTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * Gets the code.
     * 
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * Gets the name.
     * 
     * @return the name
     */
    public String getName() {
        return name;
    }

}

Therefore, the DebtTypeEnum in getDebtSpaceData branch is out-of-date.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package gov.nta.dbm.enumeration;

// TODO: Auto-generated Javadoc
/**
 * The Enum DebtTypeEnum.
 */
public enum DebtTypeEnum {

    /** The a. */
    A("A", "公債"),
    /** The b. */
    B("B", ""),
    /** The c. */
    C("C", ""),
    /** The d. */
    D("D", "");

    private String code;
    private String name;

    private DebtTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * Gets the code.
     * 
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * Gets the name.
     * 
     * @return the name
     */
    public String getName() {
        return name;
    }

}

If I would like to pull up-to-date code from master branch and merge into getDebtSpaceData branch. How to do this?

Answer
Step1. Right click => Team => Merge
 Step2. Choose Master => Merge


Step3. Click OK


In getDebtSpaceData branch, we can see the content of DebtTypeEnum is up-to-date.

Reference

No comments: