Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testcase notes] #24: Different Merge Strategies Test #62

Open
dorawyy opened this issue Oct 27, 2017 · 1 comment
Open

[testcase notes] #24: Different Merge Strategies Test #62

dorawyy opened this issue Oct 27, 2017 · 1 comment

Comments

@dorawyy
Copy link
Owner

dorawyy commented Oct 27, 2017

Sumamry:

Branches used in the series of tests:

  • ms1
  • ms2

Files used in the series of tests:

  • no conflict:
    • test24-ms1
    • test24-ms2
  • content conflict:
    • test24-content-conflict
  • edit/delete conflict:
    • test24-delete-modify-conflict

Preparation

  • Created needed files and synced branches ms1 and ms2
  • Details of the four files:

(content of test24-content-conflict)
1

(content of test24-delete-modify-conflict)
2

(content of test24-ms1 and test24-ms2)
3
4

  • after preparation, the project status becomes:

5

references

@dorawyy
Copy link
Owner Author

dorawyy commented Oct 27, 2017

Scenario1:

  • ms1 and ms2 both edited same line of file test24-content-conflict, committed;
  • when merging, conflicts

Scenario prep

  • ms1 edited file test24-content-conflict line 2, commit;
git checkout ms1
# edit file test24-content-conflict, line 2
git add test24-content-conflict
git commit -m "ms1: edit file test24-content-conflict, line2"

(ms1 edit file test24-content-conflict, line 2)
screen shot 2017-10-27 at 11 45 35 am
(the project status becomes:)
screen shot 2017-10-27 at 11 47 29 am

  • ms2 also edited file test24-content-conflict line X, commit;
git checkout ms2
# edit file test24-content-conflict, line 2
git add test24-content-conflict
git commit -m "ms2: edit file test24-content-conflict, line2"

(ms2 edit file test24-content-conflict, line 2)
screen shot 2017-10-27 at 11 48 31 am

(the project status becomes:)
screen shot 2017-10-27 at 11 48 59 am

  • Then, start merging with different strategies... (all merge from ms2, merge with ms1)

1. Using resolve merge strategy

git checkout ms2
git merge ms1 -s resolve

screen shot 2017-10-27 at 11 54 23 am

screen shot 2017-10-27 at 11 55 06 am

Then resolve the conflict

  • Use the ms1 version

screen shot 2017-10-27 at 4 25 31 pm

  • Continue merging
git add test24-content-conflict
git commit 
# then, auto commit message created for the merge

screen shot 2017-10-27 at 4 26 25 pm

screen shot 2017-10-27 at 4 27 45 pm

  • Merge conflict resolved and project status becomes:

screen shot 2017-10-27 at 4 28 20 pm

After work (reset back to before merging)

git checkout ms2
git reset --hard head~
  • Current project status is:

screen shot 2017-10-27 at 4 29 44 pm

2. Using recursive merge strategy (by default for merging two branches)

3. Using octopus merge strategy

4. Using ours merge strategy

5. Using subtree merge strategy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant