-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6.Conflict
46 lines (39 loc) · 1.02 KB
/
6.Conflict
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
45
46
$ git clone https://github.com/yarynayavor/test-conflict.git
$ cd test-conflict
$ git br testbr
$ touch file.txt
$ git add .
$ git ci -m "Added file.txt file"
$ git checkout testbr
$ explorer .
$ touch file.txt
$ git add .
$ git ci -m "Added file.txt file to branch testbr"
$ git checkout master
$ echo "Hello" > file.txt
$ git add .
$ git ci -m "Add text to file.txt"
$ git checkout testbr
$ echo "This is awesome" > file.txt
$ git add .
$ git st
$ git ci -m "Change text content in file.txt"
$ git checkout master
$ git merge testbr
Auto-merging file.txt
CONFLICT (add/add): Merge conflict in file.txt
Automatic merge failed; fix conflicts and then commit the result.
$ git merge --abort
$ start file.txt
$ git add .
$ git ci -m " try to fix conflicts in file.txt"
$ git merge testbr
Auto-merging file.txt
CONFLICT (add/add): Merge conflict in file.txt
Automatic merge failed; fix conflicts and then commit the result.
$ start file.txt
$ git add .
$ git ci -m "fixed conflict in file.txt"
$ git merge testbr
Already up-to-date.
$ git push